Add deployment script and health checks for zero-downtime updates
This commit is contained in:
@@ -18,6 +18,12 @@ services:
|
||||
volumes:
|
||||
- ./data:/app/data
|
||||
- ./public/uploads:/app/public/uploads
|
||||
healthcheck:
|
||||
test: [ "CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/api/daily" ]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
# Initialize DB if needed and run migration
|
||||
command: >
|
||||
sh -c "npx -y prisma@6.19.0 db push && node scripts/migrate-covers.mjs && node server.js"
|
||||
|
||||
Reference in New Issue
Block a user