service:
  name: ollama-piha
  owner_node: piha
  role: embed-fallback            # module 5 phase 4 (plan §2 D2/§5): local CPU bge-m3 embed backend for kb-query while SOLARIA sleeps
  exposure: private               # 127.0.0.1 + LAN bind only — never 0.0.0.0, never public ingress, no Tailscale bind
  dependencies: []
  ports:
    - container: 11434
      host: 11434                 # bound to 127.0.0.1 and LAN_BIND_IP only
      protocol: tcp
  healthcheck:
    type: http
    endpoint: http://127.0.0.1:11434/api/tags
    interval: 1m
    timeout: 10s
    retries: 3
  restart_policy: unless-stopped
  persistence:
    paths: []                     # models live in the Docker named volume ollama_piha_models (NVMe data-root)
  runtime:
    config_files:
      - .env                      # LAN_BIND_IP (gitignored, from env.example)
    env_vars:
      - LAN_BIND_IP               # required — compose port-bind interpolation
    # OLLAMA_KEEP_ALIVE is pinned to 0 in docker-compose.yml (not operator-tunable):
    # the model must never stay resident on the RAM-bound, HA-sharing Pi 5.
