Deployment
Local Development (Kind)
# Prerequisites: Docker, kind, kubectl, Rust, Node.js
make init # Build CLI, Docker image, Kind cluster, Postgres
make start # API on :3000 + UI dev server on :5173
Remote (GKE + Railway)
# 1. Set up GKE cluster
export GITHUB_USER=<your-user>
export GITHUB_PAT=<token-with-read:packages>
./scripts/setup-gke.sh \
--cluster pilot \
--region us-central1 \
--project context-hosting
# 2. Set Railway env vars (printed by setup script):
# KUBECONFIG_B64, SANDBOX_IMAGE,
# SANDBOX_IMAGE_PULL_SECRET,
# SANDBOX_API_URL, REMOTE_MODE=1
# 3. Railway auto-deploys from Dockerfile.api on push to main
# 4. CI pushes sandbox image to ghcr.io/<owner>/sandbox-pod:<sha>
Hybrid: Local API + Remote GKE
set -a
source railway.env
set +a
make start
At minimum, ensure:
SANDBOX_IMAGE=ghcr.io/<owner>/sandbox-pod:<tag>
SANDBOX_IMAGE_PULL_SECRET=ghcr-secret (if image is private)
Environment Variables
| Variable | Default | Description |
|---|
SANDBOX_IMAGE | claude-sandbox:latest | Pod image |
SANDBOX_IMAGE_PULL_POLICY | auto | K8s image pull policy |
SANDBOX_IMAGE_PULL_SECRET | unset | K8s image pull secret |
SANDBOX_API_URL | http://sandbox-api:3000 | URL pods use to reach the API |
REMOTE_MODE | unset | Set to skip Kind-specific init/destroy |
KUBECONFIG_B64 | unset | Base64-encoded kubeconfig (Railway to GKE) |
Makefile Targets
| Command | Description |
|---|
make init | Build CLI + Docker image + Kind cluster + Postgres |
make start | Run API (:3000) + UI dev server (:5173) |
make stop | Stop API + UI processes |
make rebuild | Rebuild Docker image + reload into Kind |
make check | Run fmt + lint + test |
make down | Stop processes + destroy Kind cluster |