{# inference-comfyui — env file template
   Rendered by Ansible's tasks/manage-secrets.yml on each deploy.

   secrets.<name>  — credentials from OpenBao (keys = deploy playbook's
                     `_secret_definitions`): minio_root_user, minio_root_password.
                     Optional minio_access_key / minio_secret_key may also be set
                     for a scoped key; they default to the root creds below.
   comfyui_<name>  — NON-secret config from inventory/group_vars (defaults below).
#}
# inference-comfyui — production .env
# Generated by Ansible deploy-inference-comfyui.yml on {{ ansible_date_time.iso8601 | default('<deploy-time>') }}
# Do NOT edit by hand.

# ── ComfyUI ──────────────────────────────────────────────────────────────────
# ComfyUI runs on the host (separate from this compose stack); the wrapper
# talks to it over loopback or container_network host.
COMFYUI_URL={{ comfyui_url | default('http://host.containers.internal:8188') }}

# ── Service ──────────────────────────────────────────────────────────────────
SERVICE_PORT=8189
SERVICE_LOG_LEVEL={{ comfyui_log_level | default('info') }}

# ── MinIO (independent — per-service decision) ───────────────────────────────
MINIO_ROOT_USER={{ secrets.minio_root_user }}
MINIO_ROOT_PASSWORD={{ secrets.minio_root_password }}
MINIO_ENDPOINT={{ comfyui_minio_endpoint | default('minio:9000') }}
MINIO_ACCESS_KEY={{ secrets.minio_access_key | default(secrets.minio_root_user) }}
MINIO_SECRET_KEY={{ secrets.minio_secret_key | default(secrets.minio_root_password) }}
MINIO_BUCKET={{ comfyui_minio_bucket | default('generated-images') }}
MINIO_USE_SSL=false
# Public, central-Caddy-routed prefix the wrapper prepends to stored asset keys.
GENERATED_URL_PREFIX={{ comfyui_generated_url_prefix | default('/generated/img') }}

# ── Generation defaults ──────────────────────────────────────────────────────
DEFAULT_STEPS={{ comfyui_default_steps | default('4') }}
DEFAULT_WIDTH={{ comfyui_default_width | default('1024') }}
DEFAULT_HEIGHT={{ comfyui_default_height | default('1024') }}
MAX_PROMPT_LENGTH={{ comfyui_max_prompt_length | default('1000') }}
