2021-11-25 01:10:38 +02:00
|
|
|
FROM ruby:2.7
|
2018-04-25 19:44:21 -05:00
|
|
|
|
2020-07-16 20:18:00 +03:00
|
|
|
# throw errors if Gemfile has been modified since Gemfile.lock
|
|
|
|
RUN bundle config --global frozen 1
|
|
|
|
|
2018-04-25 19:44:21 -05:00
|
|
|
WORKDIR /app
|
|
|
|
|
2020-07-19 21:30:24 +03:00
|
|
|
RUN touch /etc/app-env
|
|
|
|
|
2018-04-25 19:44:21 -05:00
|
|
|
COPY Gemfile* /app/
|
2019-04-07 19:43:10 -05:00
|
|
|
RUN gem install bundler
|
2019-10-30 20:45:50 -04:00
|
|
|
RUN bundle install --jobs 4
|
2018-04-25 19:44:21 -05:00
|
|
|
|
2020-08-25 21:46:27 +03:00
|
|
|
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
|
|
|
|
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
|
|
|
|
RUN apt-get update && apt-get install -y yarn
|
|
|
|
|
2018-04-25 19:44:21 -05:00
|
|
|
RUN mkdir /app/log
|
|
|
|
|
|
|
|
COPY . /app/
|
2020-07-16 20:18:00 +03:00
|
|
|
COPY config/database.docker.yml /app/config/database.yml
|
|
|
|
COPY config/site.docker.yml /app/config/site.yml
|
|
|
|
|
2020-07-19 16:12:57 +03:00
|
|
|
RUN RAILS_ENV=production bundle exec rake assets:precompile
|
|
|
|
|
2020-07-19 21:30:24 +03:00
|
|
|
ENTRYPOINT ["/app/docker-entrypoint.sh"]
|
2018-04-25 19:44:21 -05:00
|
|
|
|
|
|
|
EXPOSE 3000
|
2020-07-16 20:18:00 +03:00
|
|
|
|
2020-07-19 16:12:57 +03:00
|
|
|
CMD ["rails", "server", "-b", "0.0.0.0"]
|