Files
Giancarmine Salucci 4fa81a6326 fix(D2): add compose project name for gate-zero import check
Gate-zero import check runs:
  docker compose -p $SH_COMPOSE_PROJECT -f compose.yaml run --rm app ...

When SH_COMPOSE_PROJECT is unset/empty, -p consumes -f as project name
(invalid). Adding 'name: tonemark' to compose.yaml declares the project
name in the file itself — the compose file is self-sufficient.

All 14 tests pass, build + typecheck clean.
2026-07-09 00:35:33 +02:00

53 lines
2.0 KiB
YAML

# Software-house outcome-gate scaffold.
#
# No `container_name`: the gate runs this stack under a `-p <project>` 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 <proj> -f compose.yaml port app 3000`, builds
# BASE_URL=http://127.0.0.1:<resolvedPort>, 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: