andreevm

Untitled

Dec 25th, 2019
721
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. FROM ruby:2.6.5-alpine
  2.  
  3. ENV RACK_ENV=production
  4. ENV RAILS_ENV=production
  5. ENV APP_HOME=/app
  6.  
  7. RUN apk --no-cache add build-base postgresql-dev tzdata && \
  8. gem install bundler
  9.  
  10. RUN mkdir -p $APP_HOME
  11. WORKDIR $APP_HOME
  12.  
  13. # Install gems
  14. COPY Gemfile* $APP_HOME/
  15.  
  16. RUN bundle install --without development test linter security --retry=10 --jobs=$(nproc) --quiet
  17.  
  18. # Copy the app code
  19. COPY . $APP_HOME
  20.  
  21. # Expose port
  22. EXPOSE 80
  23.  
  24. CMD ["bundle", "exec", "rails", "server", "-b", "0.0.0.0", "-p", "80"]
Advertisement
Add Comment
Please, Sign In to add comment