Full-Stack Ruby on Rails application running the Pen&PaperBox
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

31 lines
953 B

FROM ruby:2.7
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
RUN apt-get update && apt-get install -y nodejs sqlite3 vim --no-install-recommends && rm -rf /var/lib/apt/lists/*
RUN gem install rake
ENV RAILS_ENV production
ENV RAILS_MAILER_METHOD test
ENV RAILS_SERVE_STATIC_FILES true
ENV RAILS_LOG_TO_STDOUT true
# Paperclip files
VOLUME /usr/src/app/public/system
EXPOSE 3000
ENTRYPOINT ["/usr/src/app/docker-entrypoint.sh"]
CMD ["rails", "server", "-b", "0.0.0.0"]
COPY Gemfile /usr/src/app/
COPY Gemfile.lock /usr/src/app/
RUN gem install bundler:1.16.4
RUN bundle config --global frozen 1
RUN bundle install
ARG app_version=development
ENV APP_VERSION $app_version
COPY . /usr/src/app
# See https://github.com/rails/rails/issues/32947#issuecomment-401886372
RUN SECRET_KEY_BASE=1c0d8925fa50b054f553e5d867d946c79d53a0c8bfd7881709c65b81d3fbc24105833f704fc944eba457467bae4c607efe800d2cdac7210c901fe661b2e1a3b7 bundle exec rake assets:precompile