Troubleshooting
Deployment
How deploys work, what to check after deploy, rollback steps
What This Does
Deployments are automated via GitHub Actions. Merging to main triggers production deploy. Merging to development triggers beta deploy.
Deploy Flow
Production (main branch)
- PR merged to
maintriggersdeploy-production.yml - GitHub Actions SSHs to the VPS at
/opt/maverick-platform - Backs up local
.envfiles - Runs
git reset --hard origin/main - Restores
.envfiles - Runs
docker compose -f docker-compose.production.yml up -d --build - Waits 90s for startup
- Health checks: API (
/health), Dashboard (HTTP 200), Status Page (HTTP 200) - Slack notification on success/failure
Beta (development branch)
Same flow but targets /opt/maverick-beta on the beta VPS (187.124.152.114), uses docker-compose.beta.yml, and waits 45s.
What To Check After Deploy
- Status Page → verify all modules are green (https://status.maverick-ins.com)
- Dashboard → log in and navigate to a few pages
- Slack → check for deploy success notification
- API health →
curl https://api.maverick-ins.com/health
Adding New Environment Variables
Env files are server-local and NOT in git. If code requires a new env var:
- SSH to the production server
- Edit the relevant env file:
- Backend:
backend/.env.production - Frontend:
frontend/apps/dashboard/.env.production
- Backend:
- Restart the affected container:
docker compose -f docker-compose.production.yml restart <service>
Rollback
If a deploy breaks something:
- Check the Slack notification for the commit that was deployed
- On GitHub, identify the last known-good commit on
main - Option A (preferred): Revert the bad commit via a PR, merge to
main, auto-deploys - Option B (emergency): SSH to server, manually
git reset --hard <good-commit>, rebuild
Common Issues
| Symptom | Cause | Fix |
|---|---|---|
| Deploy workflow failed | SSH connection timeout or build error | Check GitHub Actions run log for details |
| Health check failed after deploy | Service slow to start or config issue | Wait 2 more minutes. If still failing, check docker compose logs api |
| Env vars missing after deploy | git reset --hard cleared them, restore failed | SSH to server, re-add the env vars manually |
| Beta deploys not triggering | Merge target was wrong branch | Beta deploys on push to development only |
Related Alerts
- Deploy & CI/CD module on Status Page shows latest workflow runs and branch status