{% include 'roles/sys-svc-compose/templates/base.yml.j2' %} {% set service_name = 'jellyfin' %} {{ service_name }}: {{ lookup('container_image', application_id, 'jellyfin') }} {{ lookup('compose_only', 'container_name', JELLYFIN_NAME) }} {% include 'roles/sys-svc-container/templates/base.yml.j2' %} {{ lookup('container_ports', ['jellyfin', 'http', DOCKER_BIND_HOST]) | indent(4) }} {{ lookup('container_healthcheck', service_name) | indent(4) }} {{ lookup('container_depends_on', application_id) | indent(4) }} {{ lookup('container_volumes', service_name) | indent(4) }} {{ lookup('container_networks') | indent(4) }} {% if JELLYFIN_MCP_ENABLED | bool %} {% set service_name = JELLYFIN_MCP_SERVICE_KEY %} {% set docker_compose_env = [JELLYFIN_MCP_INSTANCE_DIR, 'upstream.env'] | path_join %} {{ service_name }}: {% include 'roles/sys-svc-container/templates/base.yml.j2' %} {{ lookup('container_image', application_id, 'jellyfinmcp') }} build: context: {{ JELLYFIN_MCP_INSTANCE_DIR }} dockerfile: Dockerfile args: MCP_ADAPTER_BASE_IMAGE: {{ lookup('config', application_id, 'services.jellyfinmcp.image') }} MCP_ADAPTER_BASE_VERSION: "{{ lookup('config', application_id, 'services.jellyfinmcp.version') }}" {{ lookup('compose_only', 'container_name', JELLYFIN_MCP_CONTAINER) }} read_only: true cap_drop: - ALL security_opt: - no-new-privileges:true environment: ADAPTER_CONTRACT: {{ JELLYFIN_MCP_CONTRACT | to_json | to_json | replace('$', '$$') }} ADAPTER_BEARER: {{ JELLYFIN_MCP_BEARER | to_json }} ADAPTER_PORT: "{{ JELLYFIN_MCP_PORT }}" ADAPTER_UPSTREAM_AUTH_HEADER: {{ JELLYFIN_MCP_UPSTREAM_AUTH_HEADER | to_json }} ADAPTER_UPSTREAM_AUTH_FORMAT: {{ JELLYFIN_MCP_UPSTREAM_AUTH_FORMAT | to_json }} expose: - "{{ JELLYFIN_MCP_PORT }}" {{ lookup('container_networks', own_network_only=True, provider_self_alias=False) | indent(4) }} {% endif %} {{ lookup('compose_volumes') }} {{ lookup('compose_networks') }}