grape.dockerfile 407 B

12345678910111213141516171819202122
  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. ADD ./ /grape
  8. WORKDIR /grape
  9. RUN bundle config set with 'puma'
  10. RUN bundle install --jobs=8 --gemfile=/grape/Gemfile
  11. ENV WEB_CONCURRENCY=auto
  12. ENV MAX_THREADS=5
  13. EXPOSE 8080
  14. CMD bundle exec puma -b tcp://0.0.0.0:8080 -e production