sinatra-postgres-agoo-mri.dockerfile 470 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. ADD ./ /sinatra
  8. WORKDIR /sinatra
  9. ENV BUNDLE_WITH=postgresql:agoo
  10. RUN bundle install --jobs=4 --gemfile=/sinatra/Gemfile
  11. ENV DBTYPE=postgresql
  12. EXPOSE 8080
  13. CMD RACK_ENV=production bundle exec rackup -r agoo -s agoo -p 8080 -q -O workers=$(ruby config/auto_tune.rb | grep -Eo '[0-9]+' | head -n 1)