hanami.dockerfile 462 B

12345678910111213141516171819202122232425
  1. FROM ruby:3.3
  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. WORKDIR /hanami
  8. COPY Gemfile ./
  9. ENV BUNDLE_FORCE_RUBY_PLATFORM=true
  10. RUN bundle install --jobs=8
  11. COPY . .
  12. EXPOSE 8080
  13. ENV HANAMI_ENV=production
  14. ENV HANAMI_PORT=8080
  15. ENV DATABASE_URL=postgres://benchmarkdbuser:benchmarkdbpass@tfb-database:5432/hello_world
  16. CMD bundle exec hanami server