docker-compose.yml for production deployment. The server process serves both the /api routes and the compiled frontend static assets, so a single container is sufficient for most deployments.
Deployment modes
- Single service
- Server + Runner split
One container runs the API and hosts the pre-built frontend. This is the default and simplest option.Use this mode unless you need to isolate review execution from the API.
System requirements
- Node.js 18+
- pnpm 10+
- PostgreSQL
- Redis (required — BullMQ has no in-memory fallback)
- Docker
- Writable directories for logs and backups
- Docker socket access if using the Runner
Required environment variables
| Variable | Description |
|---|---|
DATABASE_URL | PostgreSQL connection string |
BETTER_AUTH_SECRET | Session secret — minimum 32 characters |
Production deployment
Prepare environment variables
Create a Recommended optional variables:For AI review and chat functionality, configure the Volcengine provider (the only currently activated runtime):
.env.production file in the repository root. At minimum:Other provider keys (
OPENAI_API_KEY, ANTHROPIC_API_KEY, etc.) are accepted by the environment schema for compatibility but are not active in the current codebase.Run database migrations
Always run migrations before deploying a new version:In production, the recommended order is:
- Confirm a valid database backup exists.
- Apply migrations.
- Deploy and start the new container.
Build the production image
Build the Docker image from the repository root:The build copies the compiled frontend assets from
apps/web/dist into apps/server/dist/public so the server can serve them statically.Verify the deployment
Check that the service is healthy:Additional health endpoints:Then confirm end-to-end functionality:
- Log in to the dashboard
- Verify platform configuration is readable
- Verify AI configuration is readable
- Trigger a project sync
- Open a test pull/merge request to confirm the review queue receives and processes the event
Running with the Runner
To enable the Runner for isolated review execution, deploy it alongside the main service.Set Runner environment variables
RUNNER_TOKEN is an API key created in the AI Review dashboard under Runner management.Build and start the Runner
/var/run/docker.sock to launch executor containers for each review job.Monitor the Runner
Watch Runner health and task activity from the dashboard’s Runner management page, or check the log output directly:Key operational concerns:
- Monitor Runner heartbeat status in the dashboard
- Tune
RUNNER_MAX_CONCURRENT_JOBSto match available resources - Ensure the Runner container can reach the main service over the network
Alternative: build and run without Docker
If you prefer to run the compiled output directly on a host:./public relative to its working directory.
Upgrade checklist
- Record the current deployed commit SHA.
- Validate the migration plan on a staging environment first.
- Confirm a database backup is current and valid.
- Run
pnpm --filter server db:migrateagainst the production database. - Build and deploy the new image.
- Confirm
GET /api/healthreturns healthy. - Verify Runner registration, heartbeat, and task completion.