webhook returns 200 even when a trigger rule isn't satisfied, which would let the app's res.ok check falsely report success if the secret drifted. Set trigger-rule-mismatch-http-response-code: 403 so unauthorized triggers are clearly rejected. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
18 lines
465 B
Bash
18 lines
465 B
Bash
#!/bin/sh
|
|
set -e
|
|
|
|
echo "Waiting for Postgres to be ready..."
|
|
until nc -z postgres 5432 2>/dev/null; do
|
|
echo " Postgres not ready yet, retrying in 2s..."
|
|
sleep 2
|
|
done
|
|
echo "Postgres is ready."
|
|
|
|
echo "Running Prisma migrations..."
|
|
./node_modules/.bin/prisma migrate deploy
|
|
|
|
echo "Running Location-spine backfill (idempotent)..."
|
|
./node_modules/.bin/tsx prisma/scripts/backfill-locations.ts || echo " Backfill skipped/failed (non-fatal); check logs."
|
|
|
|
exec "$@"
|