openWa / docker-entrypoint.sh
harsh
Deploy: Initial commit without binaries
525d39f
Raw History Blame Contribute Delete
503 Bytes
#!/bin/sh
# Runs as root (via dumb-init). Fixes named-volume ownership then drops to the
# openwa user via gosu so the Node process never holds root privileges.
set -e
mkdir -p /app/data/sessions /app/data/media /app/data/plugins
chown -R openwa:openwa /app/data
# "$@" = CMD from Dockerfile (default: node dist/main).
# gosu performs exec, so the node process replaces this shell and becomes the
# direct child of dumb-init (PID 1), which can therefore forward SIGTERM cleanly.
exec gosu openwa "$@"