2024-06-06 10:46:36 +03:00
|
|
|
FROM ruby:3.1
|
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/
|
2024-02-15 09:37:38 -06:00
|
|
|
RUN gem install bundler -v 2.4.22
|
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
|
2024-06-06 10:55:19 +03:00
|
|
|
RUN apt-get update && apt-get install -y yarn netcat-openbsd
|
2020-08-25 21:46:27 +03:00
|
|
|
|
2018-04-25 19:44:21 -05:00
|
|
|
RUN mkdir /app/log
|
|
|
|
|
2022-02-09 11:28:05 +02:00
|
|
|
COPY COPYING /app/
|
|
|
|
COPY config /app/config/
|
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
|
|
|
|
|
2022-02-09 11:28:05 +02:00
|
|
|
COPY bin /app/bin/
|
|
|
|
COPY script /app/script/
|
|
|
|
COPY public /app/public/
|
|
|
|
COPY vendor /app/vendor/
|
|
|
|
|
|
|
|
COPY .yardopts /app/
|
|
|
|
COPY Rakefile /app/
|
|
|
|
COPY config.ru /app/
|
|
|
|
COPY docker-entrypoint.sh /app/
|
|
|
|
|
|
|
|
COPY lib /app/lib/
|
|
|
|
COPY app /app/app/
|
|
|
|
COPY db /app/db/
|
|
|
|
|
2022-02-21 12:32:08 +02:00
|
|
|
COPY .git /app/.git
|
|
|
|
|
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
|
|
|
|
2021-11-29 21:37:44 +02:00
|
|
|
CMD ["./bin/rails", "server", "-b", "0.0.0.0"]
|