2.1 KiB
2.1 KiB
Redeployment Quality Checklist
Before triggering a deployment on Coolify, verify this checklist to minimize downtime and errors.
🛑 Pre-Flight Checks (Local)
-
Type Check:
npm run buildMust complete without errors.
-
Environment Variables:
- Ensure
DATABASE_URLconnects to the correct prod DB. - Ensure
REDIS_URLis set for the queue. - Ensure
GOD_TOKENis defined for API security.
- Ensure
-
Schema Sync:
- If you changed the schema, run:
psql $PROD_DB_URL -f migrations/02_content_generation.sql(Coolify does not auto-migrate SQL files unless configured in start command)
-
Worker Script:
- Verify
package.jsonhas"worker": "node scripts/start-worker.js".
- Verify
🚀 Deployment Strategy
1. Zero-Downtime Config Changes
- Scenario: Changing API Keys or toggling Features.
- Action: Go to Coolify -> Environment Variables -> Edit -> Click "Restart Service" (NOT Redeploy).
- Impact: < 5s downtime.
2. Code Deployment (Standard)
- Scenario: Updating Admin UI or Logic.
- Action: Git Push to
main. - Impact: ~1-2 min build time. Coolify keeps old container running until new one is healthy.
3. Database Schema Changes (Critical)
- Scenario: Adding tables like
variation_registry. - Action: Run SQL manually via
psqlor Admin SQL Console before pushing code that relies on it. - Reason: Code might crash if it queries tables that don't exist yet.
🚨 Rollback Plan
If a deployment fails:
- Coolify: Click "Rollback" to previous image.
- Database: Review
migrations/folder forDOWNscripts (if any) or manually revert changes.
🧪 Post-Deploy Verification
- Health Check: Visit
/admin/command-station.- Check all indicators are GREEN.
- API Check:
curl -I https://spark.jumpstartscaling.com/api/health - Queue Check:
- Send a test campaign from
/admin/jumpstart-test. - Verify it appears in Generation Queue.
- Send a test campaign from