grape-unicorn.dockerfile 420 B

1234567891011121314151617181920
  1. FROM ruby:3.4
  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 update -yqq && apt-get install -yqq nginx
  8. ADD ./ /grape
  9. WORKDIR /grape
  10. RUN bundle install --jobs=4 --gemfile=/grape/Gemfile
  11. EXPOSE 8080
  12. CMD nginx -c /grape/config/nginx.conf && bundle exec unicorn -E production -c config/unicorn.rb