rack-pitchfork.dockerfile 471 B

12345678910111213141516171819202122232425
  1. FROM ruby:4.0-rc
  2. ENV RUBY_YJIT_ENABLE=1
  3. # Use Jemalloc
  4. RUN apt-get update && \
  5. apt-get install -y --no-install-recommends libjemalloc2
  6. ENV LD_PRELOAD=libjemalloc.so.2
  7. RUN apt-get install -yqq nginx
  8. WORKDIR /rack
  9. COPY Gemfile* ./
  10. ENV BUNDLE_FORCE_RUBY_PLATFORM=true
  11. RUN bundle config set with 'pitchfork'
  12. RUN bundle install --jobs=8
  13. COPY . .
  14. EXPOSE 8080
  15. CMD nginx -c /rack/config/nginx.conf && \
  16. bundle exec pitchfork -c config/pitchfork.rb -E production