mirror of https://github.com/ghostfolio/ghostfolio
Browse Source
prisma migrate deploy runs 108 sequential migrations on a fresh DB which exceeds the healthcheck timeout. prisma db push applies the full schema in one shot. Also remove set -e so failures are logged instead of silent exit. Co-authored-by: Cursor <cursoragent@cursor.com>pull/6386/head
2 changed files with 16 additions and 9 deletions
@ -1,13 +1,20 @@ |
|||
#!/bin/sh |
|||
|
|||
set -ex |
|||
echo "=== Ghostfolio entrypoint ===" |
|||
echo "PORT=${PORT:-not set}" |
|||
echo "DATABASE_URL set: $([ -n \"$DATABASE_URL\" ] && echo yes || echo NO)" |
|||
echo "REDIS_HOST=${REDIS_HOST:-not set}" |
|||
|
|||
echo "Entrypoint: PORT=${PORT:-not set}" |
|||
echo "Running database migrations" |
|||
npx prisma migrate deploy |
|||
echo "Applying database schema..." |
|||
# Use db push for speed (applies full schema in one shot). |
|||
# migrate deploy runs 108 migrations sequentially which can exceed healthcheck timeout. |
|||
npx prisma db push --accept-data-loss 2>&1 || { |
|||
echo "ERROR: prisma db push failed (exit $?). Trying migrate deploy as fallback..." |
|||
npx prisma migrate deploy 2>&1 || echo "WARNING: migrate deploy also failed" |
|||
} |
|||
|
|||
echo "Seeding the database" |
|||
npx prisma db seed || echo "Seed failed (non-fatal), continuing..." |
|||
echo "Seeding the database..." |
|||
npx prisma db seed 2>&1 || echo "Seed failed (non-fatal), continuing..." |
|||
|
|||
echo "Starting the server on port ${PORT:-3000}" |
|||
echo "Starting the server on port ${PORT:-3000}..." |
|||
exec node main |
|||
|
|||
Loading…
Reference in new issue