# Software-house outcome-gate scaffold. # # No `container_name`: the gate runs this stack under a `-p ` prefix, # isolated by project name from any live deployment sharing this same file. # # `app` publishes its port ephemerally (no fixed host port). The gate resolves # the actual host port at runtime via # `docker compose -p -f compose.yaml port app 3000`, builds # BASE_URL=http://127.0.0.1:, and polls BASE_URL + the toolchain # `health.path` (see toolchain_blob.health = {service, container_port, path}). # This is what lets the gate run concurrently with a live deployment without a # host port collision. # # For an actual running deployment (e.g. behind Caddy) that needs a stable, # known host port, use the `compose.deploy.yaml` override, which adds back the # fixed 4173:3000 mapping: # docker compose -f compose.yaml -f compose.deploy.yaml up -d --build name: tonemark services: app: build: context: . dockerfile: Dockerfile ports: - "3000" # WHISPER_URL/WEBHOOK_BASE_URL/VAPID_*/OUTPUT_DIR/DATA_DIR all have safe # in-app defaults (see src/lib/server/*.ts) — override via a .env file or # `environment:` here for a real deployment; nothing is required to boot. environment: NODE_ENV: production volumes: # Named volume at $HOME for the `node` user (uid 1000) — the base image # already owns /home/node, so Docker seeds the volume with that ownership # on first create. Persists jobs.db + transcripts across restarts. - tonemark-data:/home/node healthcheck: # Node 22 has global fetch (undici) — no curl/wget needed in the runtime image. test: [ "CMD", "node", "-e", "fetch('http://localhost:3000/api/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))" ] interval: 10s timeout: 5s retries: 10 start_period: 15s restart: unless-stopped volumes: tonemark-data: