pagepiper/compose.cloud.yml
pyr0ball 76aaabd857 feat: rename CF_ORCH_URL to GPU_SERVER_URL for self-hoster clarity
CF_ORCH_URL makes sense internally but isn't self-explanatory for a
local-first user setting up their own GPU rig. Follows the GPU_SERVER_URL
convention Kiwi already established (app/core/config.py there).

- app/config.py: resolves GPU_SERVER_URL -> CF_ORCH_URL (back-compat
  alias) -> https://orch.circuitforge.tech default when CF_LICENSE_KEY
  is present (Paid+ tiers). Written back to os.environ["CF_ORCH_URL"]
  so existing callers (get_llm_config, app/api/chat.py) needed zero
  changes.
- .env.example / .env.cloud.example: document GPU_SERVER_URL as the
  primary name, CF_ORCH_URL noted as a still-honoured legacy alias.
- compose.cloud.yml: the hardcoded coordinator URL now sets
  GPU_SERVER_URL instead of CF_ORCH_URL directly (relies on the same
  config.py normalization).
- docs/reference/environment-variables.md updated.
- 6 new tests covering the resolution priority chain and the
  write-back behavior legacy callers depend on.

Closes: #10
2026-07-10 17:23:27 -07:00

55 lines
1.9 KiB
YAML

# Pagepiper — cloud managed instance
# Project: pagepiper-cloud (docker compose -f compose.cloud.yml -p pagepiper-cloud ...)
# Web: http://127.0.0.1:8533 → pagepiper.circuitforge.tech (primary)
# → menagerie.circuitforge.tech/pagepiper (secondary)
# API: internal only on pagepiper-cloud-net (nginx proxies /api/ → api:8522)
services:
api:
build:
context: ..
dockerfile: pagepiper/Dockerfile
restart: unless-stopped
env_file: .env
environment:
CLOUD_MODE: "true"
PAGEPIPER_DATA_DIR: /devl/pagepiper-cloud-data
PAGEPIPER_BOOKS_DIR: /devl/pagepiper-cloud-data/books
# PAGEPIPER_OLLAMA_URL — set in .env (BYOK gate for hybrid search + RAG)
# HEIMDALL_URL, HEIMDALL_ADMIN_TOKEN — set in .env for license validation
# GPU server: route LLM inference through the cf-orch coordinator for
# managed GPU access (app/config.py normalizes this into CF_ORCH_URL
# internally, so no other service code needs to change)
GPU_SERVER_URL: http://host.docker.internal:7700
CF_APP_NAME: pagepiper
# CF_LICENSE_KEY is the auth token CFOrchClient sends to the coordinator
CF_LICENSE_KEY: ${COORDINATOR_PAGEPIPER_KEY:-}
COORDINATOR_URL: http://10.1.10.71:7700
COORDINATOR_PAGEPIPER_KEY: ${COORDINATOR_PAGEPIPER_KEY:-}
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- /devl/pagepiper-cloud-data:/devl/pagepiper-cloud-data
- ${HOME}/.config/circuitforge:/root/.config/circuitforge:ro
networks:
- pagepiper-cloud-net
web:
build:
context: .
dockerfile: docker/web/Dockerfile
args:
VITE_BASE_URL: /pagepiper
VITE_API_BASE: /pagepiper
NGINX_CONF: docker/web/nginx.cloud.conf
restart: unless-stopped
ports:
- "8533:80"
networks:
- pagepiper-cloud-net
depends_on:
- api
networks:
pagepiper-cloud-net:
driver: bridge