File size: 2,114 Bytes
5c747ec
 
 
 
 
 
 
 
 
d4c8dea
 
 
 
 
 
5c747ec
 
 
 
 
 
 
 
 
 
 
 
ca89449
5c747ec
 
 
d4c8dea
 
 
 
5c747ec
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
services:
  cli:
    image: ${HEADROOM_IMAGE:-ghcr.io/chopratejas/headroom:latest}
    entrypoint: ["headroom"]
    working_dir: /workspace
    stdin_open: true
    tty: true
    environment:
      HOME: /tmp/headroom-home
      # Canonical Headroom filesystem contract (issue #175). Forwarded into
      # the container so the proxy resolves state/config to the bind-mounted
      # /tmp/headroom-home/.headroom path. HEADROOM_WORKSPACE (above) remains
      # the Docker bind-mount source and is intentionally different.
      HEADROOM_WORKSPACE_DIR: /tmp/headroom-home/.headroom
      HEADROOM_CONFIG_DIR: /tmp/headroom-home/.headroom/config
    volumes:
      - ${HEADROOM_WORKSPACE:-.}:/workspace
      - ${HEADROOM_HOST_HOME:?set HEADROOM_HOST_HOME}/.headroom:/tmp/headroom-home/.headroom
      - ${HEADROOM_HOST_HOME:?set HEADROOM_HOST_HOME}/.claude:/tmp/headroom-home/.claude
      - ${HEADROOM_HOST_HOME:?set HEADROOM_HOST_HOME}/.codex:/tmp/headroom-home/.codex
      - ${HEADROOM_HOST_HOME:?set HEADROOM_HOST_HOME}/.gemini:/tmp/headroom-home/.gemini
    command: ["--help"]

  proxy:
    image: ${HEADROOM_IMAGE:-ghcr.io/chopratejas/headroom:latest}
    entrypoint: ["headroom", "proxy"]
    working_dir: /workspace
    restart: unless-stopped
    environment:
      HOME: /tmp/headroom-home
      HEADROOM_HOST: 0.0.0.0
      # Canonical Headroom filesystem contract (issue #175). See `cli` service
      # above for rationale.
      HEADROOM_WORKSPACE_DIR: /tmp/headroom-home/.headroom
      HEADROOM_CONFIG_DIR: /tmp/headroom-home/.headroom/config
    ports:
      - "${HEADROOM_PORT:-8787}:${HEADROOM_PORT:-8787}"
    volumes:
      - ${HEADROOM_WORKSPACE:-.}:/workspace
      - ${HEADROOM_HOST_HOME:?set HEADROOM_HOST_HOME}/.headroom:/tmp/headroom-home/.headroom
      - ${HEADROOM_HOST_HOME:?set HEADROOM_HOST_HOME}/.claude:/tmp/headroom-home/.claude
      - ${HEADROOM_HOST_HOME:?set HEADROOM_HOST_HOME}/.codex:/tmp/headroom-home/.codex
      - ${HEADROOM_HOST_HOME:?set HEADROOM_HOST_HOME}/.gemini:/tmp/headroom-home/.gemini
    command: ["--host", "0.0.0.0", "--port", "${HEADROOM_PORT:-8787}"]