rails-pitchfork.dockerfile 681 B

123456789101112131415161718192021222324252627
  1. FROM ruby:3.5-rc
  2. RUN apt-get update -yqq && apt-get install -yqq --no-install-recommends redis-server
  3. EXPOSE 8080
  4. WORKDIR /rails
  5. # ENV RUBY_YJIT_ENABLE=1 YJIT is enabled in config/initializers/enable_yjit.rb
  6. # Use Jemalloc
  7. RUN apt-get update && \
  8. apt-get install -y --no-install-recommends libjemalloc2
  9. ENV LD_PRELOAD=libjemalloc.so.2
  10. COPY ./Gemfile* /rails/
  11. ENV BUNDLE_FORCE_RUBY_PLATFORM=true
  12. ENV BUNDLE_WITH=postgresql:pitchfork
  13. RUN bundle install --jobs=8
  14. COPY . /rails/
  15. ENV RAILS_ENV=production_postgresql
  16. ENV PORT=8080
  17. ENV REDIS_URL=redis://localhost:6379/0
  18. CMD service redis-server start && \
  19. RACK_ENV=production bundle exec pitchfork -c config/pitchfork.rb