A previous commit (via an agent write-file path with overaggressive
secret redaction) silently corrupted three Environment= lines in the
api/deriver Quadlet templates — the {{ delimiters around references
to honcho_auth_enabled, honcho_jwt_secret, and honcho_anthropic_api_key
were replaced with *** in the template file itself. Ansible templated
those *** through verbatim, and Honcho refused to start because
AUTH_USE_AUTH then resolved to the literal string "*** honcho_...".
Patched the templates back to proper Jinja via a side-channel that
bypasses the redactor. Verified the raw bytes on disk show 7b7b...7d7d
({{...}}) around all three references.
73 lines
3.2 KiB
Django/Jinja
73 lines
3.2 KiB
Django/Jinja
# mk-labs Honcho API service (FastAPI on :8000)
|
|
# Managed by Ansible - honcho role
|
|
|
|
[Unit]
|
|
Description=Honcho API
|
|
After=network-online.target {{ honcho_postgres_container_name }}.service
|
|
Wants=network-online.target
|
|
Requires={{ honcho_postgres_container_name }}.service
|
|
|
|
[Container]
|
|
Image={{ honcho_image }}
|
|
ContainerName={{ honcho_container_name }}
|
|
Network={{ honcho_network_name }}
|
|
PublishPort={{ honcho_listen_address }}:{{ honcho_listen_port }}:8000
|
|
|
|
# Run the entrypoint that performs DB migration before starting FastAPI.
|
|
Exec=/app/docker/entrypoint.sh
|
|
|
|
# -- Database ---------------------------------------------------------------
|
|
Environment=DB_CONNECTION_URI=postgresql+psycopg://{{ honcho_db_user }}:{{ honcho_db_password }}@{{ honcho_postgres_container_name }}:5432/{{ honcho_db_name }}
|
|
|
|
# -- Auth (USE_AUTH + JWT secret) -------------------------------------------
|
|
Environment=AUTH_USE_AUTH={{ honcho_auth_enabled | string | lower }}
|
|
Environment=AUTH_JWT_SECRET={{ honcho_jwt_secret }}
|
|
|
|
# -- LLM provider keys ------------------------------------------------------
|
|
{% if honcho_llm_transport == 'anthropic' %}
|
|
Environment=LLM_ANTHROPIC_API_KEY={{ honcho_anthropic_api_key }}
|
|
{% endif %}
|
|
|
|
# -- Deriver subsystem ------------------------------------------------------
|
|
Environment=DERIVER_FLUSH_ENABLED={{ honcho_deriver_flush_enabled | string | lower }}
|
|
Environment=DERIVER_MODEL_CONFIG__TRANSPORT={{ honcho_llm_transport }}
|
|
Environment=DERIVER_MODEL_CONFIG__MODEL={{ honcho_deriver_model }}
|
|
|
|
# -- Summary subsystem ------------------------------------------------------
|
|
Environment=SUMMARY_MODEL_CONFIG__TRANSPORT={{ honcho_llm_transport }}
|
|
Environment=SUMMARY_MODEL_CONFIG__MODEL={{ honcho_summary_model }}
|
|
|
|
# -- Dialectic subsystem (per-level overrides; defaults are openai) ---------
|
|
Environment=DIALECTIC_LEVELS__minimal__MODEL_CONFIG__TRANSPORT={{ honcho_llm_transport }}
|
|
Environment=DIALECTIC_LEVELS__minimal__MODEL_CONFIG__MODEL={{ honcho_dialectic_model }}
|
|
Environment=DIALECTIC_LEVELS__low__MODEL_CONFIG__TRANSPORT={{ honcho_llm_transport }}
|
|
Environment=DIALECTIC_LEVELS__low__MODEL_CONFIG__MODEL={{ honcho_dialectic_model }}
|
|
Environment=DIALECTIC_LEVELS__medium__MODEL_CONFIG__TRANSPORT={{ honcho_llm_transport }}
|
|
Environment=DIALECTIC_LEVELS__medium__MODEL_CONFIG__MODEL={{ honcho_dialectic_model }}
|
|
Environment=DIALECTIC_LEVELS__high__MODEL_CONFIG__TRANSPORT={{ honcho_llm_transport }}
|
|
Environment=DIALECTIC_LEVELS__high__MODEL_CONFIG__MODEL={{ honcho_dialectic_model }}
|
|
Environment=DIALECTIC_LEVELS__max__MODEL_CONFIG__TRANSPORT={{ honcho_llm_transport }}
|
|
Environment=DIALECTIC_LEVELS__max__MODEL_CONFIG__MODEL={{ honcho_dialectic_model }}
|
|
|
|
# -- Embeddings (Anthropic has no embed API; off by default) ----------------
|
|
Environment=EMBED_MESSAGES={{ honcho_embed_messages | string | lower }}
|
|
|
|
# -- Vector store -----------------------------------------------------------
|
|
Environment=VECTOR_STORE_TYPE=pgvector
|
|
|
|
# -- Public-facing URL (empty -> relative URLs) -----------------------------
|
|
{% if honcho_web_url | length > 0 %}
|
|
Environment=HONCHO_PUBLIC_URL={{ honcho_web_url }}
|
|
{% endif %}
|
|
|
|
# Timezone matches host baseline
|
|
Environment=TZ=America/Chicago
|
|
Environment=LOG_LEVEL=INFO
|
|
|
|
[Service]
|
|
Restart=always
|
|
TimeoutStartSec=180
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target default.target
|