Requirements
Before deploying, ensure the following are available:- Node.js 18+
- pnpm 10+
- PostgreSQL
- Redis (required by BullMQ queues — there is no in-memory fallback)
- Docker (required if using the Runner)
- Writable directories for logs and backups
Deployment modes
- Single service
- Server + runner
The server process serves both the
/api routes and the compiled frontend static assets from ./public. This is the simplest deployment topology.One container or process handles everything. No separate runner process is required unless you want isolated review execution.Required environment variables
| Variable | Description |
|---|---|
DATABASE_URL | PostgreSQL connection string |
BETTER_AUTH_SECRET | Authentication secret (32+ characters) |
Recommended environment variables
| Variable | Description |
|---|---|
APP_URL | Public URL of the application |
APP_URLs | Allowed origin URLs |
BETTER_AUTH_URL | URL used by Better Auth |
PORT | Server listen port (default: 3000) |
HOSTNAME | Server listen hostname |
REDIS_URL | Redis connection string |
AI_REVIEW_CONCURRENCY | Number of concurrent review jobs |
WEBHOOK_BASE_URL | Base URL for incoming webhooks |
LOG_DIR | Directory for log files |
LOG_LEVEL | Log verbosity level |
LOG_RETENTION_DAYS | How many days to retain log files |
BACKUP_DIR | Directory for backup files |
AUTO_BACKUP_ENABLED | Enable automatic backups |
BACKUP_RETENTION_DAYS | How many days to retain backups |
METRICS_RETENTION_DAYS | How many days to retain metrics data |
AI provider configuration
The currently active AI runtime isvolcengine. For review and chat functionality in production, configure at minimum:
OPENAI_API_KEY, ANTHROPIC_API_KEY, AZURE_OPENAI_API_KEY, etc.) are accepted by the container but correspond to runtimes that are not currently active.
Build
Database migration
- Validate the migration on a staging environment first
- Confirm a valid backup exists before migrating the production database
- Use a minimal-privilege database account for the application
Deploying with Docker Compose
Create your production env file
Copy and populate
.env.production with your required environment variables.Start the application
3000 internally. The Docker Compose file maps it to host port 9000 by default:Static asset hosting
In production, the server serves frontend static files from the./public directory relative to its working directory. If your build artifact distribution differs from the default build process, ensure the compiled frontend assets are placed where the server process can access them at runtime.
Upgrade procedure
Validate on staging
Run the database migration and verify webhook behavior on a staging environment before touching production.
Verify runner registration
Confirm that runner registration, heartbeat reporting, and task pickup still work after the migration.