From 1dc092f87fd36a9905bb96339bfe21ab59ec003b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Fri, 20 Nov 2026 15:55:22 +0100 Subject: [PATCH] Fix indentation of rendered compose.yaml Jinja control tags are now at column 0 without whitespace modifiers: with trim_blocks, the whole tag line disappears and no stray spaces are added before the following line. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01VnXP3D1srf5k8MrtPFUz93 --- templates/compose.yaml | 56 ++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 32 deletions(-) diff --git a/templates/compose.yaml b/templates/compose.yaml index 644f89f..3a3111d 100644 --- a/templates/compose.yaml +++ b/templates/compose.yaml @@ -5,35 +5,32 @@ services: image: {{ registry_url }}/{{ registry_project }}/{{ chill_image_nginx_name }}:{{ chill.chill_image_tag }} links: - app:php - - {% if traefik_install %} +{% if traefik_install %} labels: - "traefik.enable=true" - "traefik.docker.network=traefik" - "traefik.http.routers.frontend-{{ chill.chill_environment }}.rule=Host(`{{ chill.host }}`)" - "traefik.http.routers.frontend-{{ chill.chill_environment }}.entrypoints=websecure" - {%+ if chill.tls_config == 'self_signed' +%} +{% if chill.tls_config == 'self_signed' %} - "traefik.http.routers.frontend-{{ chill.chill_environment }}.tls=true" - {%+ endif +%} - {%+ if chill.expose_port is not false +%} +{% endif %} +{% if chill.expose_port is not false %} - "traefik.http.routers.frontend-exp-{{ chill.chill_environment }}.rule=PathPrefix(`/`)" - "traefik.http.routers.frontend-exp-{{ chill.chill_environment }}.entrypoints=chill{{ chill.chill_environment }}" - {%+ if chill.tls_config == 'self_signed' +%} +{% if chill.tls_config == 'self_signed' %} - "traefik.http.routers.frontend-exp-{{ chill.chill_environment }}.tls=true" - {%+ endif +%} - {%+ endif +%} - {% endif %} - - {% if chill.expose_port is not false +%} +{% endif %} +{% endif %} +{% endif %} +{% if chill.expose_port is not false %} ports: - "{{ chill.expose_port }}:80" - {%+ endif %} +{% endif %} networks: - - {% if traefik_install %} +{% if traefik_install %} - traefik - {% endif %} +{% endif %} - default restart: always @@ -50,20 +47,19 @@ services: volumes: - './config/prod:/var/www/app/config/packages/prod:ro' - '/var/log/chill:/var/www/app/var/log:rw' - {% if chill.load_template_override +%} +{% if chill.load_template_override %} - './templates:/var/www/app/templates:ro' - {%+ endif %} +{% endif %} - '{{ doc_storage_dir }}/{{ chill['chill_environment'] }}:/var/storage:rw' links: - redis - relatorio - {% if chill.rabbitmq_install +%} +{% if chill.rabbitmq_install %} - rabbitmq - {%+ endif %} - - {% if chill.add_postgres -%} +{% endif %} +{% if chill.add_postgres %} - database - {%- endif %} +{% endif %} networks: - default @@ -99,8 +95,7 @@ services: entrypoint: "/usr/bin/env" command: ["bin/console", "chill:cron-job:execute", "-v"] restart: "no" - - {% if chill.add_postgres %} +{% if chill.add_postgres %} database: image: "{{ database_image }}" @@ -111,8 +106,7 @@ services: networks: - default restart: always - - {% endif %} +{% endif %} ###> chill-project/chill-bundles ### redis: @@ -161,8 +155,7 @@ services: # depends_on: # rabbitmq: # condition: service_healthy - - {% if chill.rabbitmq_install +%} +{% if chill.rabbitmq_install %} rabbitmq: image: "{{ chill_image_rabbitmq }}" env_file: @@ -180,13 +173,12 @@ services: options: max-size: "10m" max-file: "3" - {% endif %} +{% endif %} networks: - - {% if traefik_install %} +{% if traefik_install %} traefik: external: true - {% endif %} +{% endif %} default: \ No newline at end of file