AppsWorker
Worker
Background worker that provisions and destroys Railway deployments.
The Worker is a background service that polls Supabase for pending provision_jobs and manages Railway service deployments via the Railway GraphQL API.
How it works
- Polls the
provision_jobstable every 5 seconds (configurable viaPOLL_INTERVAL_MS) - For provision jobs: creates a Railway project and service with the configured Docker image
- For destroy jobs: deletes the Railway service
- Posts status updates back to the Console via
CONSOLE_CALLBACK_URL
Outbound calls
| Target | Method | Description |
|---|---|---|
Console /api/webhooks/instance-status | POST | Reports provision/destroy results back to Console |
| Supabase | — | Reads provision_jobs, updates instances and job status |
| Railway GraphQL API | POST | Creates/deletes Railway services |
Key paths
| Path | Description |
|---|---|
apps/worker/src/ | Worker source code |
apps/worker/Dockerfile | Production container image |