lib/generators/templates/Dockerfile.erb in dockerfile-rails-0.3.2 vs lib/generators/templates/Dockerfile.erb in dockerfile-rails-0.4.0

- old
+ new

@@ -33,11 +33,15 @@ COPY <%= api_client_dir %> . RUN npm run build <% end -%> +<% if options.fullstaq -%> +FROM quay.io/evl.ms/fullstaq-ruby:${RUBY_VERSION}-<%= @options.jemalloc ? 'jemalloc-' : '' %>slim as base +<% else -%> FROM ruby:$RUBY_VERSION-slim as base +<% end -%> # Rails app lives here WORKDIR /rails # Set production environment @@ -167,10 +171,13 @@ COPY --from=client /rails/<%= api_client_dir %>/build /rails/public <% end -%> # Deployment options ENV RAILS_LOG_TO_STDOUT="1" \ - RAILS_SERVE_STATIC_FILES="true" + RAILS_SERVE_STATIC_FILES="true"<% if options.yjit %> \ + RUBY_YJIT_ENABLE="1"<% end %><% if options.jemalloc and not options.fullstaq %> \ + LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libjemalloc.so.2" \ + MALLOC_CONF="dirty_decay_ms:1000,narenas:2,background_thread:true"<% end %> # Entrypoint prepares the database. ENTRYPOINT ["/rails/bin/docker-entrypoint"] # Start the server by default, this can be overwritten at runtime