Files
HiveGrid-Wireframes/03 Quellen und Referenzen/hivegrid-cloud/start.sh
T
2026-07-08 16:15:37 +02:00

21 lines
732 B
Bash
Executable File

#!/bin/sh
# Web entrypoint. Migrations and the production seed run here (env-gated)
# because Coolify's pre/post_deployment_command never fired for
# docker-image applications, and a pre-deploy hook would execute inside
# the OLD container without the new migration files anyway.
# A failed migrate or seed aborts the boot (set -e), so the deploy
# health gate turns red instead of shipping a stale schema silently.
set -e
if [ "$MIGRATE_ON_BOOT" = "true" ]; then
echo "[boot] prisma migrate deploy"
pnpm exec prisma migrate deploy --config prisma.config.ts
fi
if [ "$SEED_ON_BOOT" = "true" ]; then
echo "[boot] production seed"
node packages/db/dist/production-seed.server.js
fi
exec node build/server-runtime/server.js