mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
Every compose.yml.j2 now declares services as '{{ service_name }}:' with
its '{% set %}' knobs on two-space lines above the key, includes at four
spaces and if/for tags aligned to the content they wrap. The layout
renders correctly because stack_host_template enables lstrip_blocks for
compose.yml.j2; indent(4, True) in the container base and '{%+' guards
in whitespace-sensitive scalars keep the shared fragments identical
under both render modes. A new lint test enforces the skeleton.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
20 lines
641 B
Django/Jinja
20 lines
641 B
Django/Jinja
{# Base for docker services #}
|
|
|
|
{{ lookup('compose_restart', docker_restart_policy | default(DOCKER_RESTART_POLICY)) }}
|
|
{% if docker_compose_env is defined and docker_compose_env != '' %}
|
|
env_file:
|
|
- "{{ docker_compose_env }}"
|
|
{% elif application_id | has_env %}
|
|
env_file:
|
|
- "{{ lookup('container', application_id, 'files.env') }}"
|
|
{% endif %}
|
|
logging:
|
|
driver: journald
|
|
{% if DEPLOYMENT_MODE == 'compose' %}
|
|
{% filter indent(4, True) %}
|
|
{% include 'roles/sys-svc-container/templates/resource.yml.j2' %}
|
|
{% endfilter %}
|
|
{% endif %}
|
|
{% include 'roles/sys-svc-container/templates/deploy.yml.j2' %}
|
|
{{ "\n" }}
|