16 lines
356 B
Bash
16 lines
356 B
Bash
#!/bin/sh
|
|
set -eu
|
|
|
|
mkdir -p /app/runs/memory/cold
|
|
|
|
if chown -R node:node /app/runs 2>/dev/null; then
|
|
exec su-exec node "$@"
|
|
fi
|
|
|
|
if su-exec node sh -c 'test -w /app/runs && test -w /app/runs/memory'; then
|
|
exec su-exec node "$@"
|
|
fi
|
|
|
|
echo "[entrypoint] WARNING: /app/runs is not writable by user node; starting as root for this bind mount." >&2
|
|
exec "$@"
|