Files
spliit/scripts/container-entrypoint.sh
Pavle 1c83ebd6f9 Use exec in container entryptoint to replace shell (#326)
This will replace the `sh` process from the container entrypoint with the node process as PID 1, to properly handle SIGTERM signals and gracefully shut down the container.

Currently, `sh` will intercept any signals and not forward them to node, leaving the container in the terminating state before docker force kills it after the 10s grace period. This means that db connections won't be closed and that requests will get interrupted during shutdown.
2025-04-19 15:07:11 -04:00

7 lines
78 B
Bash
Executable File

#!/bin/bash
set -euxo pipefail
npx prisma migrate deploy
exec npm run start