This guide covers deploying Reactorcide to a VM with a single command.
- Go 1.21+ (to build the coordinator binary)
- SSH client with key-based authentication to the target VM
- rsync
- containerd with nerdctl, or Docker with Docker Compose v2
- SSH access (key-based authentication)
- Runtime access for the deployment user. Prefer nerdctl/containerd where available; Docker remains supported.
Required:
export REACTORCIDE_DEPLOY_HOST="your-vm-hostname-or-ip"
export REACTORCIDE_DEPLOY_USER="your-ssh-user"
export REACTORCIDE_DEPLOY_DOMAINS="your-domain.com"Optional (auto-generated if not provided):
export REACTORCIDE_DB_PASSWORD="your-db-password"
export REACTORCIDE_JWT_SECRET="your-jwt-secret"Optional configuration:
export REACTORCIDE_REMOTE_DIR="~/reactorcide" # Default: ~/reactorcide
export REACTORCIDE_WORKER_CONCURRENCY="2" # Default: 2
export REACTORCIDE_WORKER_POLL_INTERVAL="5" # Default: 5 seconds
export REACTORCIDE_LOG_LEVEL="info" # Default: infoFrom the repository root:
bash deployment/deploy-vm.shThe script will:
- Build the coordinator binary locally
- Copy all deployment files to the VM
- Build container images on the VM
- Start all services
- Run database migrations
- Verify the deployment
SSH to your VM and create a token:
ssh your-user@your-vm
cd ~/reactorcide
docker compose -f docker-compose.prod.yml exec coordinator-api /reactorcide token create --name "my-token"Save the generated token - it's only shown once.
Check the API health:
curl http://your-vm:6080/api/v1/healthAfter deployment, these services will be running:
| Service | Port | Description |
|---|---|---|
| coordinator-api | 6080 | REST API for job management |
| corndogs | 5080 | CSIL-RPC task queue |
| postgres | 5432 | Main database |
| worker | - | Job processor |
With your API token, submit a job. code_dir defaults to /job/src, job_dir defaults to code_dir, and deployed workers run as the image runner uid unless run_as_user is set.
curl -X POST http://your-vm:6080/api/v1/jobs \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "test-job",
"source_url": "https://github.com/your-org/your-repo.git",
"source_ref": "main",
"source_type": "git",
"job_command": "echo Hello from Reactorcide",
"run_as_user": "runner"
}'To update an existing deployment, simply run the deploy script again:
bash deployment/deploy-vm.shThe script will rebuild images and restart services with the new code.
ssh your-user@your-vm
cd ~/reactorcide
docker compose -f docker-compose.prod.yml logs -f coordinator-api
docker compose -f docker-compose.prod.yml logs -f workerdocker compose -f docker-compose.prod.yml psdocker compose -f docker-compose.prod.yml restartnerdctl ps || docker ps