services:
  # 这个 override 专门给 tohka 这种“宿主机 Caddy -> localhost 端口 -> Docker 容器”模式使用。
  # 使用方式：
  # docker compose \
  #   -f deploy/docker/compose.package.yml \
  #   -f deploy/docker/compose.tohka.override.yml \
  #   --env-file deploy/docker/.env up -d
  backend:
    environment:
      TERMI_ADMIN_TRUST_PROXY_AUTH: ${TERMI_ADMIN_TRUST_PROXY_AUTH:-true}
      TERMI_ADMIN_LOCAL_LOGIN_ENABLED: ${TERMI_ADMIN_LOCAL_LOGIN_ENABLED:-false}
      TERMI_ADMIN_PROXY_SHARED_SECRET: ${TERMI_ADMIN_PROXY_SHARED_SECRET:?TERMI_ADMIN_PROXY_SHARED_SECRET is required for tohka proxy mode}
    ports:
      - '127.0.0.1:${BACKEND_PORT:-5150}:5150'

  backend-worker:
    environment:
      TERMI_ADMIN_TRUST_PROXY_AUTH: ${TERMI_ADMIN_TRUST_PROXY_AUTH:-true}
      TERMI_ADMIN_LOCAL_LOGIN_ENABLED: ${TERMI_ADMIN_LOCAL_LOGIN_ENABLED:-false}
      TERMI_ADMIN_PROXY_SHARED_SECRET: ${TERMI_ADMIN_PROXY_SHARED_SECRET:?TERMI_ADMIN_PROXY_SHARED_SECRET is required for tohka proxy mode}

  frontend:
    ports:
      - '127.0.0.1:${FRONTEND_PORT:-4321}:4321'

  admin:
    ports:
      - '127.0.0.1:${ADMIN_PORT:-4322}:80'
