service:
  name: llm-gateway
  owner_node: piha
  role: llm-router
  exposure: private              # Tailscale-only bind (TAILSCALE_BIND_IP); no public ingress, no npm
  dependencies:
    - ollama                     # upstream inference @ SOLARIA :11434 (external node; SOLARIA may be powered down)
  ports:
    - container: 8080
      host: 8080
      protocol: tcp
  healthcheck:
    type: http
    endpoint: http://localhost:8080/     # GET / -> {"status":"gateway ok"}
    interval: 30s
    timeout: 10s
    retries: 5
  restart_policy: unless-stopped
  persistence:
    paths: []                    # stateless — nothing to back up
  runtime:
    config_files:
      - .env                     # TAILSCALE_BIND_IP (+ optional OLLAMA_URL); gitignored, from env.example
    env_vars:
      - TAILSCALE_BIND_IP        # required — compose port-bind interpolation
      - OLLAMA_URL               # optional — defaults to http://solaria:11434/api/generate
