- Pandu reviews every MR labelled `labuh` through Codex app-server and answers in a fixed shape; the Hub checks each piece of evidence, applies hard rules the model cannot override, retries once, and posts the comments itself. - The board shows the harbour: lanes per environment, Dicek / Siap gas / Beres, two fixed berth rows, boats that glide; GitLab sign-in, approvers from board.json, works on a phone. - Gas, Tunda, Tolak and Tutup MR with 15 seconds to undo; the Hub checks GitLab again and merges the reviewed commit only, then follows the deploy. - Branches that deploy from tags get a proposed version and changelog; the approver confirms the number and the Hub creates the annotated tag. - Telegram notifications, reminders, dry mode for rehearsals. - Hosting: one image, three containers. The reviewer runs in its own container with no GitLab token and read-only checkouts, reached by the Hub over a token-guarded WebSocket; every command it asks for still passes the Hub's allowlist. Configuration and state live in LABUH_HOME. - AGPL-3.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
60 lines
2.0 KiB
YAML
60 lines
2.0 KiB
YAML
# Before the first start (see README, "Host it"): put hub.json, board.json and reviewer.json in
|
|
# ./data, fill hub.env and board.env, and create reviewer.token with `openssl rand -hex 32`.
|
|
services:
|
|
hub:
|
|
build: .
|
|
restart: unless-stopped
|
|
env_file: hub.env
|
|
environment:
|
|
LABUH_REVIEWER_TOKEN_FILE: /run/labuh/reviewer.token
|
|
volumes:
|
|
- ./data:/data
|
|
- ./reviewer.token:/run/labuh/reviewer.token:ro
|
|
# Team notes the reviewer may read (reviewer.json "knowledge"): the same path in both.
|
|
# - /srv/notes:/knowledge:ro
|
|
depends_on:
|
|
- reviewer
|
|
|
|
# Pandu: Codex app-server, reached only by the Hub. It holds no GitLab token and sees the
|
|
# checkouts read-only; the container is its sandbox, and every command it wants to run is
|
|
# still put to the Hub's allowlist first.
|
|
reviewer:
|
|
build: .
|
|
restart: unless-stopped
|
|
command: ["sh", "-c", "exec codex app-server --listen ws://0.0.0.0:4820 --ws-auth capability-token --ws-token-file /run/labuh/reviewer.token"]
|
|
environment:
|
|
CODEX_HOME: /codex
|
|
read_only: true
|
|
tmpfs:
|
|
- /tmp
|
|
cap_drop:
|
|
- ALL
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
volumes:
|
|
- reviewer-codex:/codex
|
|
- ./data/.work:/data/.work:ro
|
|
- ./reviewer.token:/run/labuh/reviewer.token:ro
|
|
# - /srv/notes:/knowledge:ro
|
|
healthcheck:
|
|
test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:4820/readyz').then(r=>process.exit(r.ok?0:1),()=>process.exit(1))"]
|
|
interval: 30s
|
|
start_period: 10s
|
|
|
|
board:
|
|
build: .
|
|
restart: unless-stopped
|
|
command: ["node", "--disable-warning=ExperimentalWarning", "src/board.ts"]
|
|
env_file: board.env
|
|
ports:
|
|
- "4810:4810"
|
|
volumes:
|
|
- ./data:/data
|
|
healthcheck:
|
|
test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:4810/',{redirect:'manual'}).then(r=>process.exit(r.status<500?0:1),()=>process.exit(1))"]
|
|
interval: 30s
|
|
start_period: 10s
|
|
|
|
volumes:
|
|
reviewer-codex:
|