Skip to content

Commit edf3f68

Browse files
committed
docker: add USE_JEMALLOC env var and disable it by default
1 parent 223876d commit edf3f68

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

  • docker/root/etc/s6-overlay/s6-rc.d

docker/root/etc/s6-overlay/s6-rc.d/init-db-migration/run

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@
33

44
echo "Running db migration script";
55
cd /db_migrations;
6-
export LD_PRELOAD=/usr/local/lib/libjemalloc.so
6+
if [ "${USE_JEMALLOC:-false}" = "true" ]; then
7+
export LD_PRELOAD=/usr/local/lib/libjemalloc.so
8+
fi
79
exec node index.js;

docker/root/etc/s6-overlay/s6-rc.d/svc-web/run

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@
22
# shellcheck shell=bash
33

44
cd /app/apps/web;
5-
export LD_PRELOAD=/usr/local/lib/libjemalloc.so
5+
if [ "${USE_JEMALLOC:-false}" = "true" ]; then
6+
export LD_PRELOAD=/usr/local/lib/libjemalloc.so
7+
fi
68
exec node server.js;

docker/root/etc/s6-overlay/s6-rc.d/svc-workers/run

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@
22
# shellcheck shell=bash
33

44
cd /app/apps/workers;
5-
export LD_PRELOAD=/usr/local/lib/libjemalloc.so
5+
if [ "${USE_JEMALLOC:-false}" = "true" ]; then
6+
export LD_PRELOAD=/usr/local/lib/libjemalloc.so
7+
fi
68
exec node dist/index.js

0 commit comments

Comments
 (0)