Documentation

CapRover

Deploy from GitHub with the generated CapRover workflow.

Choose CapRover

Select CapRover under Hosting when generating a project. Your download includes .github/workflows/deploy.yml, configured for the app name derived from your project slug.

A push to main starts CI. The generated project must pass its checks, including workspace tests, before CI calls the deployment workflow. That workflow builds the Docker image, publishes it to GitHub Container Registry, and deploys the image tagged with the commit SHA.

Set up deployment

  1. Create a CapRover app matching your project slug. Enable its App Token under Deployment.
  2. Add your domain, enable HTTPS, and force HTTPS.
  3. Add the GitHub repository secrets CAPROVER_SERVER (your captain URL) and APP_TOKEN (the app token).
  4. Give CapRover pull access to GitHub Container Registry if your image package is private.
  5. Configure DATABASE_URL and SITE_URL in the app's runtime environment. Set SITE_URL to your public HTTPS origin. Add your Sentry or PostHog configuration if enabled.

Optional worker app

Every generated project runs background jobs inside the web app by default. The generated workflow can also deploy the same image to a second CapRover app that only runs jobs: create an app named after your slug with a -worker suffix, give it the web app's environment plus JOBS_WORKER=only, and add its app token as the WORKER_APP_TOKEN repository secret. The workflow deploys the worker whenever that secret exists; the project's own CapRover guide walks through it and explains when to switch the web app to JOBS_WORKER=false.

Verify your release

Set the GitHub repository variable PRODUCTION_URL to the public HTTPS origin of the web app. After deployment, the workflow requests /healthz there and looks for an x-deployment-revision header matching the pushed commit SHA. Without the variable, it skips this check: a green workflow alone does not tell you which revision your domain serves.

If you deploy a separate worker, the web response cannot tell you whether that worker is running. In CapRover, check that the worker is running the image tagged with the same commit SHA, then look for job worker started in that instance's logs. Keep the web app processing jobs until you confirm the worker has started. Startup is not proof that a particular job finished; for that, check the job's expected result.