Files
computer-playbook/roles/svc-ai-mcp-adapter/templates/compose.yml.j2
kevinveenbirkenbachandClaude Opus 5 a3ea18c700 refactor(compose): finish the context-wired volumes lookups
acc9e25c0f moved the volume lookups to context-wired signatures, taking
application_id from the task context instead of an argument:

  lookup('container_volumes', application_id, service_name) -> (service_name)
  lookup('compose_volumes', application_id)                 -> ()

Six templates were left on the old form: the three AI services and hermes,
homeassistant and openclaw. One of them also picks up the matching
container_healthcheck lookup.

This is the same failure mode as the php paths: a refactor that leaves
callers behind, and the break only appears when the template renders, not in
the gate. A deploy in this session died exactly that way, on a template still
passing application_id to a lookup that no longer takes terms.

No file in the repository carries the old signature after this.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-28 12:49:41 +02:00

27 lines
880 B
Django/Jinja

{% include 'roles/sys-svc-compose/templates/base.yml.j2' %}
{% set service_name = 'mcp-adapter' %}
{{ service_name }}:
{% include 'roles/sys-svc-container/templates/base.yml.j2' %}
{{ lookup('container_image', application_id, 'mcp-adapter') }}
build:
context: {{ MCP_ADAPTER_BUILD_DIR }}
dockerfile: Dockerfile
args:
MCP_ADAPTER_BASE_IMAGE: {{ MCP_ADAPTER_BASE_IMAGE }}
MCP_ADAPTER_BASE_VERSION: "{{ MCP_ADAPTER_BASE_VERSION }}"
{{ lookup('compose_only', 'container_name', MCP_ADAPTER_CONTAINER) }}
read_only: true
cap_drop:
- ALL
security_opt:
- no-new-privileges:true
expose:
- "{{ MCP_ADAPTER_PORT }}"
{{ lookup('container_healthcheck', service_name) | indent(4) }}
{{ lookup('container_networks') | indent(4) }}
{{ lookup('compose_networks') }}
{{ lookup('compose_volumes') }}