-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
34 lines (26 loc) · 1.14 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
FROM ruby:2.7.5
RUN apt-get update && apt-get install -y curl apt-transport-https ca-certificates wget
RUN wget --no-check-certificate -qO - https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash
RUN apt-get install -y nodejs
RUN apt-get install -y yarn
RUN apt-get clean
RUN rm -rf /var/lib/apt/lists/* /usr/src/*
ENV DOCKERIZE_VERSION v0.6.1
RUN curl -L https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
| tar -C /usr/local/bin -xz
WORKDIR /app
COPY Gemfile Gemfile.lock /app/
RUN gem install bundler -v 2.4.22
RUN bundle config set without "development test"
RUN bundle config set force_ruby_platform true
COPY . /app
RUN bundle install
RUN yarn install
RUN RAILS_ENV=development DATABASE_URL=nulldb://user:pass@127.0.0.1/dbname bundle exec rails assets:precompile
ENTRYPOINT ["/app/docker/entrypoint.sh"]
VOLUME /unicorn
VOLUME /assets
# Start the main process.
CMD ["bundle", "exec", "unicorn", "-c", "./config/unicorn.rb"]