Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@ EXPOSE 3000

ENV NODE_OPTIONS=--max-old-space-size=3072

# Heap snapshots are opt-in: set HEAP_SNAPSHOT_ENABLED=1 to activate.
# When enabled, cd into the heapdumps volume mount so snapshots land there.
# Heap profiling is opt-in: set HEAP_SNAPSHOT_ENABLED=1 to activate.
# When enabled, cd into the heapdumps volume mount so snapshots land there,
# take snapshots on demand via SIGUSR2, and log GC activity (--trace-gc is
# not permitted in NODE_OPTIONS, so it must live here). No
# --heapsnapshot-near-heap-limit: serializing a full heap at the limit
# needs more memory than is left, so it only hastens the OOM kill.
# exec replaces sh with node for proper signal handling.
CMD ["/bin/sh", "-c", "if [ \"$HEAP_SNAPSHOT_ENABLED\" = \"1\" ] || [ \"$HEAP_SNAPSHOT_ENABLED\" = \"true\" ]; then cd /app/heapdumps && exec node --heapsnapshot-near-heap-limit=3 --heapsnapshot-signal=SIGUSR2 /app/.output/server/index.mjs; else exec node /app/.output/server/index.mjs; fi"]
CMD ["/bin/sh", "-c", "if [ \"$HEAP_SNAPSHOT_ENABLED\" = \"1\" ] || [ \"$HEAP_SNAPSHOT_ENABLED\" = \"true\" ]; then cd /app/heapdumps && exec node --trace-gc --heapsnapshot-signal=SIGUSR2 /app/.output/server/index.mjs; else exec node /app/.output/server/index.mjs; fi"]
Loading