diff --git a/scripts/docker-entrypoint.sh b/scripts/docker-entrypoint.sh index 8edac4c..b18299f 100755 --- a/scripts/docker-entrypoint.sh +++ b/scripts/docker-entrypoint.sh @@ -9,8 +9,13 @@ mkdir -p /app/public/uploads/backgrounds deploy_migrations() { echo "Deploying migrations..." - # Try to deploy migrations - if pnpm dlx prisma migrate deploy 2>&1 | tee /tmp/migrate.log; then + # Try to deploy migrations and capture both output and exit code + # Use a temporary file to capture exit code since tee masks it + pnpm dlx prisma migrate deploy > /tmp/migrate.log 2>&1 + MIGRATE_EXIT=$? + cat /tmp/migrate.log # Display output + + if [ $MIGRATE_EXIT -eq 0 ]; then echo "Migrations deployed successfully" return 0 fi