This commit is contained in:
Stefan Lazic committed 2026-08-04 09:57:58 +01:00
1 parent 546613e677
commit 4785510144
82 files changed
+4903 -287

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
#!/bin/sh
# Entrypoint for the `next-chair` app container — see docker-compose.local.yaml.
# `migrate deploy` (never `migrate reset`) is safe to run on every
# container start: it only applies migrations not yet recorded in
# `_prisma_migrations`, so a restart with an already-up-to-date schema is
# a fast no-op, never destructive. It intentionally does NOT seed —
# development fixtures are a separate, explicit opt-in service (see
# `next-chair-seed` in docker-compose.local.yaml and the brief's own
# "production installation versus development seed" distinction); a
# fresh container is left empty and shows the installation wizard.
set -e
echo "[entrypoint] Applying database migrations..."
npx prisma migrate deploy
echo "[entrypoint] Starting application..."
# `exec` + calling the `next` binary directly (not `npm run start`) so
# the Next.js server process itself receives SIGTERM directly from
# Docker on `docker stop` / `docker compose down` — routing through npm
# as an intermediary process can swallow the signal and force a slower
# SIGKILL after Compose's stop-grace-period instead of a clean shutdown.
exec node_modules/.bin/next start -p "${PORT:-3000}"