Use jemalloc for memory allocation
All checks were successful
continuous-integration/drone/pr Build is passing

This commit is contained in:
Andrew Tomaka 2024-01-26 20:48:19 -05:00
parent e239c421c6
commit e06439e275
Signed by: atomaka
GPG key ID: 61209BF70A5B18BE

View file

@ -43,7 +43,7 @@ FROM base
# Install packages needed for deployment # Install packages needed for deployment
RUN apt-get update -qq && \ RUN apt-get update -qq && \
apt-get install --no-install-recommends -y curl libsqlite3-0 libvips && \ apt-get install --no-install-recommends -y curl libsqlite3-0 libvips libjemalloc2 && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives rm -rf /var/lib/apt/lists /var/cache/apt/archives
# Copy built artifacts: gems, application # Copy built artifacts: gems, application
@ -55,6 +55,8 @@ RUN useradd rails --create-home --shell /bin/bash && \
chown -R rails:rails db log storage tmp chown -R rails:rails db log storage tmp
USER rails:rails USER rails:rails
ENV LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2
# Entrypoint prepares the database. # Entrypoint prepares the database.
ENTRYPOINT ["/rails/bin/docker-entrypoint"] ENTRYPOINT ["/rails/bin/docker-entrypoint"]