Logo

Command Palette

Search for a command to run...

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.com in the API environment and ensure both app.yourdomain.com and api.yourdomain.com sit 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

  1. Import the repo, set Root Directory to apps/web.
  2. Build command: npx turbo build --filter=starter-web
  3. Set env vars: NEXT_PUBLIC_API_URL, API_URL, ENCRYPTION_KEY, SESSION_SECRET, MONGO_URI, and any NEXT_PUBLIC_* branding vars.

Backend on Render / Railway

  1. Build command: npm install && npx turbo build --filter=starter-api
  2. Start command: node apps/api/dist/index.js
  3. 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:

SecretDescription
VPS_HOSTVPS IP or hostname
VPS_USERSSH user
VPS_SSH_KEYPrivate SSH key
VPS_APP_DIRAbsolute path to the cloned repo on VPS
ROOT_ENV_FILEFull 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.