- Add orchestrator-staging compose service under profile 'staging' so normal 'docker compose up -d' does NOT start it. - Port 8501 via command override; network_mode: host (no ports mapping needed). - DB isolation via separate volume ./data/staging:/app/data — physically separate from prod ./data/orchestrator.db on the host. - ORCH_DB_PATH=/app/data/orchestrator.db explicit in env (same container path, isolated by volume mount). - Add .env.staging.example with all required keys and placeholders. - Update .gitignore: add .env.staging and data/staging/ exclusions. - Add docs/STAGING.md: how to start staging, architecture table, roadmap. Refs: ORCH-31 (Stage 1 of 5)
64 lines
2.4 KiB
YAML
64 lines
2.4 KiB
YAML
services:
|
|
orchestrator:
|
|
build: .
|
|
container_name: orchestrator
|
|
restart: unless-stopped
|
|
# init: true injects docker-init (tini) as PID 1 so reparented grandchild
|
|
# processes from the claude/node subprocess tree are reaped (no zombies, B-2).
|
|
init: true
|
|
network_mode: host
|
|
volumes:
|
|
- ./data:/app/data
|
|
- /home/slin/repos:/repos
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
- /usr/lib/node_modules/@anthropic-ai/claude-code:/opt/claude-code:ro
|
|
- /usr/bin/node:/usr/bin/node:ro
|
|
- /home/slin/.claude:/home/slin/.claude
|
|
- /home/slin/.claude.json:/home/slin/.claude.json:ro
|
|
- /home/slin/.orchestrator-ssh:/root/.ssh:ro
|
|
env_file: .env
|
|
environment:
|
|
- ORCH_REPOS_DIR=/repos
|
|
- ORCH_HOST_REPOS_DIR=/home/slin/repos
|
|
- DEPLOY_SSH_USER=slin
|
|
- DEPLOY_SSH_HOST=127.0.0.1
|
|
- DEPLOY_HOOK_SCRIPT=/home/slin/bin/enduro-deploy-hook.sh
|
|
group_add:
|
|
- "999"
|
|
|
|
# ORCH-31: staging instance (port 8501, isolated DB).
|
|
# Starts ONLY with: docker compose --profile staging up -d orchestrator-staging
|
|
# Normal "docker compose up -d" does NOT start this service.
|
|
orchestrator-staging:
|
|
profiles:
|
|
- staging
|
|
build: .
|
|
container_name: orchestrator-staging
|
|
restart: unless-stopped
|
|
init: true
|
|
network_mode: host
|
|
command: ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "8501"]
|
|
volumes:
|
|
- ./data/staging:/app/data
|
|
- /home/slin/repos:/repos
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
- /usr/lib/node_modules/@anthropic-ai/claude-code:/opt/claude-code:ro
|
|
- /usr/bin/node:/usr/bin/node:ro
|
|
- /home/slin/.claude:/home/slin/.claude
|
|
- /home/slin/.claude.json:/home/slin/.claude.json:ro
|
|
- /home/slin/.orchestrator-ssh:/root/.ssh:ro
|
|
env_file: .env.staging
|
|
environment:
|
|
- ORCH_REPOS_DIR=/repos
|
|
- ORCH_HOST_REPOS_DIR=/home/slin/repos
|
|
- DEPLOY_SSH_USER=slin
|
|
- DEPLOY_SSH_HOST=127.0.0.1
|
|
- DEPLOY_HOOK_SCRIPT=/home/slin/bin/enduro-deploy-hook.sh
|
|
# Staging DB is isolated via ./data/staging volume mount.
|
|
# Inside the container the path remains /app/data/orchestrator.db (same default),
|
|
# but on the host it physically lives at ./data/staging/orchestrator.db —
|
|
# completely separate from prod ./data/orchestrator.db.
|
|
- ORCH_DB_PATH=/app/data/orchestrator.db
|
|
group_add:
|
|
- "999"
|