File size: 1,303 Bytes
23a7459
 
c6e6dac
23a7459
3666689
23a7459
3666689
c6e6dac
3666689
 
23a7459
3666689
 
c6e6dac
 
 
 
 
 
3666689
 
23a7459
321bbb7
 
c6e6dac
 
321bbb7
 
 
 
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
# Runs the whole stack in one container: headless Chrome + 2 extensions + the monitor
# (which also serves the API gateway) + the two backend servers.
#
# The chrome image (built from ./Dockerfile) now bakes in both servers and start_hf.sh
# launches them on localhost alongside Chrome — exactly what the extensions expect (they dial
# 127.0.0.1:9225/9226). So there are no separate server containers anymore; that would
# collide on the same ports. Only port 3001 is published.
#
# Internal port map (all on the container's 127.0.0.1):
#   chrome   : 9222 CDP, 9223 CDP-proxy
#   monitor  : 3001 UI + API gateway (/gpt /gemini)
#   chatgpt  : 9225 (ws + http API)
#   gemini   : 8000 http API, 9226 cookie-WS

services:
  chrome:
    build: .
    platform: linux/amd64
    ports:
      - "3001:3001"   # monitor UI + API gateway (the only published port)
    environment:
      API_KEY: ${API_KEY:-}   # gates /gpt /gemini; from .env. Unset = APIs disabled (503)
    volumes:
      - chrome-profile:/home/chrome/data   # persists cookies/logins across restarts
    restart: unless-stopped

# Named volume keeps the Chrome profile (logins/cookies) across `docker compose down/up`
# and host reboots — the self-host equivalent of HF persistent storage, no Postgres needed.
volumes:
  chrome-profile: