Files
iag-dev-evaluator/docker-start.sh
Julien Froidefond dc8581f545
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 2m54s
Update Dockerfile to add a new startup script and adjust permissions for entrypoint and startup scripts, simplifying the command execution process.
2026-02-20 13:46:42 +01:00

16 lines
447 B
Bash

#!/bin/sh
set -e
# Run migrations; if P3005 (schema not empty, no migration history), baseline then retry
if ! npx prisma migrate deploy 2>/dev/null; then
echo "Migration failed, attempting baseline (P3005 fix)..."
for dir in /app/prisma/migrations/*/; do
[ -d "$dir" ] || continue
name=$(basename "$dir")
npx prisma migrate resolve --applied "$name" 2>/dev/null || true
done
npx prisma migrate deploy
fi
exec node server.js