Files
archie/docker-compose.yml
T
sam d80401d595 feat: add config overlay and shared RPC/Yaegi packages
- Introduce `-config-overlay` flag and `config.LoadOverlay()` to merge a base config with an overlay file, only overriding fields the overlay sets. This enables docker-compose to mount the base config from the host and apply only deployment-specific overrides.
- Create `internal/natsrpc` package with reusable NATS request/reply primitives (Envelope, Client, Call, RegisterAll, Respond). Migrate storerpc, worktreerpc, and forgerpc to use it, eliminating duplicated marshal/unmarshal and error handling.
- Create `internal/yaegiutil` package with shared interpreter construction (stdlib + extra symbols), generic export resolution (Resolve), and panic recovery (Safe). Migrate all Yaegi-based surfaces (gate scripts, daemon plugins, skill plugins, workflow stages, skill scripts) to use it, reducing boilerplate and centralizing panic safety.
- Simplify `config.docker.toml` to contain only overlay fields (paths, container config) and remove the duplicated repos list – the base config is now the single source of truth.
- Update docker-compose.yml to pass both -config and -config-overlay flags and mount the base config from the host.
- Add tests for LoadOverlay, DockerConfigOverlaysExampleConfig, Envelope, and yaegiutil utilities.
2026-07-24 12:57:10 +10:00

58 lines
1.9 KiB
YAML

# archie-core stack: daemon, NATS, and agent containers.
#
# Start: docker compose up -d
# Stop: docker compose down
# Logs: docker compose logs -f archied
services:
# ── NATS JetStream ────────────────────────────────────────────────
nats:
image: nats:2.14-alpine3.22
command: -js -m 8222
ports:
- "4222:4222" # client
- "8222:8222" # monitoring (http://localhost:8222)
volumes:
- nats_data:/data
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-q", "-O", "-", "http://localhost:8222/healthz"]
interval: 10s
timeout: 5s
retries: 5
# ── archie daemon ──────────────────────────────────────────────────
archied:
image: git.catlow.cloud/sam/archied:latest
command: -config /etc/archie/config.toml -config-overlay /etc/archie/config.docker.toml
extra_hosts:
- "host.docker.internal:host-gateway"
ports:
- "8484:8484" # web dashboard
environment:
- ARCHIE_GITEA_TOKEN
- DEEPSEEK_API_KEY
volumes:
- ${HOME}/.config/archie/config.toml:/etc/archie/config.toml:ro
- ./config.docker.toml:/etc/archie/config.docker.toml:ro
- /var/lib/archie/work:/var/lib/archie/work
- /var/lib/archie/db:/var/lib/archie
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
nats:
condition: service_healthy
restart: unless-stopped
# ── agent image (built once, spawned by daemon) ────────────────────
agent:
build:
context: .
dockerfile: Dockerfile
image: git.catlow.cloud/sam/archie-agent:latest
command: ["true"]
entrypoint: [""]
restart: "no"
volumes:
nats_data: