feat: robust automatic DB migration for Docker deployments
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 44s
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 44s
Backup before migration (pg_dump/SQLite copy), DB connection wait with retries, idempotent prisma migrate deploy, old backup cleanup (keep 5), and server refuses to start if migration fails. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -51,6 +51,8 @@ services:
|
||||
volumes:
|
||||
# Persist uploaded images and files
|
||||
- keep-uploads:/app/data/uploads
|
||||
# Persist migration backups
|
||||
- backup-data:/app/data/backups
|
||||
|
||||
# Optional: Mount custom SSL certificates
|
||||
# - ./certs:/app/certs:ro
|
||||
@@ -106,5 +108,7 @@ volumes:
|
||||
driver: local
|
||||
keep-uploads:
|
||||
driver: local
|
||||
backup-data:
|
||||
driver: local
|
||||
# ollama-data:
|
||||
# driver: local
|
||||
|
||||
Reference in New Issue
Block a user