services:
  zhct-codex-relay:
    build:
      context: ../control/codex-relay
    image: zhct-codex-relay:local
    container_name: zhct-codex-relay
    restart: unless-stopped
    env_file:
      - ../config/local/codex-relay.env
    environment:
      RELAY_PROVIDER: codex_cli
      HOST: 0.0.0.0
      PORT: 8787
      LOG_DIR: /app/runtime/logs
      HOST_CODEX_HOME: /host-codex
      CODEX_HOME: /app/runtime/codex-home
      HOME: /app/runtime/home
      CODEX_BIN: codex
      CODEX_MODEL: ""
      CODEX_WORKDIR: /workspace/zhct/zhctprompt
      CODEX_ADD_DIRS: /workspace/zhct/zhctproject,/workspace/zhct/zhctlogs
      CODEX_EXTRA_ARGS: --dangerously-bypass-approvals-and-sandbox
    ports:
      - "8787:8787"
    volumes:
      - ../..:/workspace/zhct
      - /Users/lqt/.codex:/host-codex:ro
      - ../work/codex-relay/runtime:/app/runtime
    working_dir: /workspace/zhct/zhctprompt
