Add automatic baseline fallback to docker-compose command
This commit is contained in:
@@ -24,6 +24,6 @@ services:
|
|||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
retries: 3
|
||||||
start_period: 40s
|
start_period: 40s
|
||||||
# Run migrations and start server
|
# Run migrations and start server (auto-baseline on first run if needed)
|
||||||
command: >
|
command: >
|
||||||
sh -c "npx prisma migrate deploy && node scripts/migrate-release-years.mjs && node scripts/migrate-covers.mjs && node server.js"
|
sh -c "npx prisma migrate deploy || (echo 'Baselining existing database...' && sh scripts/baseline-migrations.sh && npx prisma migrate deploy) && node scripts/migrate-release-years.mjs && node scripts/migrate-covers.mjs && node server.js"
|
||||||
|
|||||||
Reference in New Issue
Block a user