Basecamp Sherpa
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

  1. Polls the provision_jobs table every 5 seconds (configurable via POLL_INTERVAL_MS)
  2. For provision jobs: creates a Railway project and service with the configured Docker image
  3. For destroy jobs: deletes the Railway service
  4. Posts status updates back to the Console via CONSOLE_CALLBACK_URL

Outbound calls

TargetMethodDescription
Console /api/webhooks/instance-statusPOSTReports provision/destroy results back to Console
SupabaseReads provision_jobs, updates instances and job status
Railway GraphQL APIPOSTCreates/deletes Railway services

Key paths

PathDescription
apps/worker/src/Worker source code
apps/worker/DockerfileProduction container image