Deployment
Deploy RocketX using Docker Compose, Vercel + Render, or a self-hosted VPS with GitHub Actions.
[!IMPORTANT] Because auth uses HttpOnly cookies, your UI and API must share a cookie domain. In production, set
AUTH_DOMAIN=.yourdomain.comin the API environment and ensure bothapp.yourdomain.comandapi.yourdomain.comsit under that parent domain.
Option 1 — Docker Compose (recommended for self-hosting)
The included docker-compose.yml starts api, web, and mongodb services from a single root .env:
docker compose up --build
The multi-stage Dockerfile uses turbo prune to create minimal per-app images. If you run behind nginx, set:
client_max_body_size 25m;
Option 2 — Vercel (web) + Render / Railway (API)
Frontend on Vercel
- Import the repo, set Root Directory to
apps/web. - Build command:
npx turbo build --filter=starter-web - Set env vars:
NEXT_PUBLIC_API_URL,API_URL,ENCRYPTION_KEY,SESSION_SECRET,MONGO_URI, and anyNEXT_PUBLIC_*branding vars.
Backend on Render / Railway
- Build command:
npm install && npx turbo build --filter=starter-api - Start command:
node apps/api/dist/index.js - Set env vars:
MONGO_URI,ENCRYPTION_KEY,SESSION_SECRET,AUTH_DOMAIN,FRONTEND_URL, mail vars, and GitHub App vars.
Option 3 — GitHub Actions → VPS
The repo includes .github/workflows/deploy-vps.yml. Required secrets:
| Secret | Description |
|---|---|
VPS_HOST | VPS IP or hostname |
VPS_USER | SSH user |
VPS_SSH_KEY | Private SSH key |
VPS_APP_DIR | Absolute path to the cloned repo on VPS |
ROOT_ENV_FILE | Full contents of your root .env |
The workflow writes .env, pulls the branch, and runs docker compose up -d --build --remove-orphans.
Post-Deployment Checklist
- Verify the cookie domain is set and cookies persist across the UI ↔ API boundary.
- Test GitHub App installation callback redirect (should return to the Developer Portal).
- Confirm the GitHub webhook URL in your GitHub App settings points to
https://api.yourdomain.com/v1/webhooks/github. - Run a test strategy submission end-to-end: repo picker → commit picker → version details → pipeline results.
- Enable subscription reconciliation: the cron runs every 30 minutes to expire lapsed subscriptions.