Maverick Docs
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)

  1. PR merged to main triggers deploy-production.yml
  2. GitHub Actions SSHs to the VPS at /opt/maverick-platform
  3. Backs up local .env files
  4. Runs git reset --hard origin/main
  5. Restores .env files
  6. Runs docker compose -f docker-compose.production.yml up -d --build
  7. Waits 90s for startup
  8. Health checks: API (/health), Dashboard (HTTP 200), Status Page (HTTP 200)
  9. 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

  1. Status Page → verify all modules are green (https://status.maverick-ins.com)
  2. Dashboard → log in and navigate to a few pages
  3. Slack → check for deploy success notification
  4. API healthcurl 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:

  1. SSH to the production server
  2. Edit the relevant env file:
    • Backend: backend/.env.production
    • Frontend: frontend/apps/dashboard/.env.production
  3. Restart the affected container: docker compose -f docker-compose.production.yml restart <service>

Rollback

If a deploy breaks something:

  1. Check the Slack notification for the commit that was deployed
  2. On GitHub, identify the last known-good commit on main
  3. Option A (preferred): Revert the bad commit via a PR, merge to main, auto-deploys
  4. Option B (emergency): SSH to server, manually git reset --hard <good-commit>, rebuild

Common Issues

SymptomCauseFix
Deploy workflow failedSSH connection timeout or build errorCheck GitHub Actions run log for details
Health check failed after deployService slow to start or config issueWait 2 more minutes. If still failing, check docker compose logs api
Env vars missing after deploygit reset --hard cleared them, restore failedSSH to server, re-add the env vars manually
Beta deploys not triggeringMerge target was wrong branchBeta deploys on push to development only
  • Deploy & CI/CD module on Status Page shows latest workflow runs and branch status

On this page