From f545970f05e86b7bd12ec76b5b78095acf3dd47e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 19 Jan 2026 17:55:29 +0100 Subject: [PATCH 01/17] Make Traefik installation optional via `traefik_install` variable --- defaults/main.yml | 3 +++ tasks/main.yml | 1 + 2 files changed, 4 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index 89c5f6a..02c3903 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -9,3 +9,6 @@ chill_image_redis: "redis" chill_image_rabbitmq: "rabbitmq:3-management-alpine" chill_image_relatorio: "registry.gitlab.com/champs-libres/public/relatorio-tornado/app:latest" traefik_image_traefik: "traefik:v3.2" + +# to install or not traefik as front-end +traefik_install: true \ No newline at end of file diff --git a/tasks/main.yml b/tasks/main.yml index 6151e61..7072ab1 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -60,6 +60,7 @@ - name: Install traefik ansible.builtin.include_tasks: traefik.yml + when: traefik_install - name: Install systemd services ansible.builtin.template: -- 2.54.1 From 64d0a63e68842c6c2898aa035c9299e1b5688707 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 20 Jan 2026 16:33:32 +0100 Subject: [PATCH 02/17] handle traefik_install variables, and set default values for each chill configuration --- defaults/main.yml | 35 ++++++++++++++++++++++- tasks/chill/main.yml | 24 ++++++++-------- tasks/chill/self_signed.yml | 8 +++--- tasks/main.yml | 4 --- templates/compose.yaml | 41 +++++++++++++++++---------- templates/env_file.env | 55 +++++++++++++++++++------------------ 6 files changed, 105 insertions(+), 62 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 02c3903..a3e6afb 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -11,4 +11,37 @@ chill_image_relatorio: "registry.gitlab.com/champs-libres/public/relatorio-torna traefik_image_traefik: "traefik:v3.2" # to install or not traefik as front-end -traefik_install: true \ No newline at end of file +traefik_install: true + +# default chill config for each environment +default_chill: + chill_environment: main_env + add_postgres: false + chill_image_tag: v0.0.1-beta + host: 'devpms.samusocial.be' + tls_config: self_signed + expose_port: 8010 # can be false, or the port number + chill_config: + trusted_hosts: 'devpms.samusocial.be ' + database_host: '172.17.17.71' + database_port: '5432' + database_name: 'chilldev' + database_user: 'chilldev' + database_version: '15' + # database_password: + mailer_user: '' + mailer_host: 'smtp.example.com' + mailer_port: '25' + notification_host: 'https://devpms.samusocial.be ' + notification_from_email: 'devpms@samusocial.be' + # app_secret: + # admin_password: + mailer_dsn: 'null://null' + mailer_url: 'null://null' + # jwt_passphrase: + # jwt_secret_key: '1234' + # jwt_public_key: '1234' + rabbitmq_user: 'chilldev' + # rabbitmq_password: + editor_server: 'https://collabora.samusocial.be' + ovhcloud_dsn: 'null://null' \ No newline at end of file diff --git a/tasks/chill/main.yml b/tasks/chill/main.yml index 96cfb16..3b968b0 100644 --- a/tasks/chill/main.yml +++ b/tasks/chill/main.yml @@ -1,10 +1,10 @@ -- name: Debug task - ansible.builtin.debug: - var: item +- name: Merge defaults with item + ansible.builtin.set_fact: + chill: "{{ default_chill | combine(item, recursive=True) }}" - name: Create directories to store compose project ansible.builtin.file: - path: "{{ install_dir }}/{{ item['chill_environment'] }}" + path: "{{ install_dir }}/{{ chill['chill_environment'] }}" state: directory mode: '0755' owner: "{{ as_user }}" @@ -12,34 +12,34 @@ - name: Add compose.yml file ansible.builtin.template: src: compose.yaml - dest: "{{ install_dir }}/{{ item['chill_environment'] }}/compose.yaml" + dest: "{{ install_dir }}/{{ chill['chill_environment'] }}/compose.yaml" owner: "{{ as_user }}" mode: '0444' - name: Add application environment file ansible.builtin.template: src: env_file.env - dest: "{{ install_dir }}/{{ item['chill_environment'] }}/env_file.env" + dest: "{{ install_dir }}/{{ chill['chill_environment'] }}/env_file.env" owner: "{{ as_user }}" mode: '0400' - name: Add postgresql environment file if need ansible.builtin.template: src: postgres.env - dest: "{{ install_dir }}/{{ item['chill_environment'] }}/postgres.env" + dest: "{{ install_dir }}/{{ chill['chill_environment'] }}/postgres.env" owner: "{{ as_user }}" mode: '0400' - name: Add rabbitmq environment file ansible.builtin.template: src: rabbitmq.env - dest: "{{ install_dir }}/{{ item['chill_environment'] }}/rabbitmq.env" + dest: "{{ install_dir }}/{{ chill['chill_environment'] }}/rabbitmq.env" owner: "{{ as_user }}" mode: '0400' - name: Create directory for storing configuration ansible.builtin.file: - path: "{{ install_dir }}/{{ item['chill_environment'] }}/config/prod" + path: "{{ install_dir }}/{{ chill['chill_environment'] }}/config/prod" state: directory owner: "{{ as_user }}" mode: '0400' @@ -47,7 +47,7 @@ - name: Copy configuration files ansible.builtin.template: src: "config/prod/{{ file }}" - dest: "{{ install_dir }}/{{ item['chill_environment'] }}/config/prod/{{ file }}" + dest: "{{ install_dir }}/{{ chill['chill_environment'] }}/config/prod/{{ file }}" owner: "{{ as_user }}" mode: '0444' loop: @@ -61,7 +61,7 @@ - name: Create directory for storing data ansible.builtin.file: - path: "{{ doc_storage_dir }}/{{ item['chill_environment'] }}" + path: "{{ doc_storage_dir }}/{{ chill['chill_environment'] }}" owner: "82" group: "82" mode: '0766' @@ -71,6 +71,6 @@ # # - name: Ensure systemd timer for cronjob is up # ansible.builtin.systemd_service: -# name: "chill-cronjob@{{ item['chill_environment'] }}.timer" +# name: "chill-cronjob@{{ chill['chill_environment'] }}.timer" # state: restarted # enabled: true diff --git a/tasks/chill/self_signed.yml b/tasks/chill/self_signed.yml index 288887c..c083138 100644 --- a/tasks/chill/self_signed.yml +++ b/tasks/chill/self_signed.yml @@ -1,18 +1,18 @@ - name: Create directory for storing certificates ansible.builtin.file: - path: "/var/traefik/certs/chill/{{ item['chill_environment'] }}" + path: "/var/traefik/certs/chill/{{ chill['chill_environment'] }}" state: directory owner: "{{ as_user }}" mode: '0400' - name: Create private key community.crypto.openssl_privatekey: - path: "/var/traefik/certs/chill/{{ item['chill_environment'] }}/key.pem" + path: "/var/traefik/certs/chill/{{ chill['chill_environment'] }}/key.pem" - name: Create self signed certificate community.crypto.x509_certificate: - privatekey_path: "/var/traefik/certs/chill/{{ item['chill_environment'] }}/key.pem" - path: "/var/traefik/certs/chill/{{ item['chill_environment'] }}/cert.pem" + privatekey_path: "/var/traefik/certs/chill/{{ chill['chill_environment'] }}/key.pem" + path: "/var/traefik/certs/chill/{{ chill['chill_environment'] }}/cert.pem" provider: selfsigned diff --git a/tasks/main.yml b/tasks/main.yml index 7072ab1..9d525d3 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -13,10 +13,6 @@ docker_install_compose_plugin: true docker_add_repo: true -- name: Print all available facts - ansible.builtin.debug: - var: ansible_facts - - name: Authenticate against private docker registry community.docker.docker_login: registry_url: "{{ registry_url }}" diff --git a/templates/compose.yaml b/templates/compose.yaml index c8c25db..fa65a1e 100644 --- a/templates/compose.yaml +++ b/templates/compose.yaml @@ -2,42 +2,51 @@ services: frontend: - image: {{ registry_url }}/{{ registry_project }}/{{ chill_image_nginx_name }}:{{ item.chill_image_tag }} + image: {{ registry_url }}/{{ registry_project }}/{{ chill_image_nginx_name }}:{{ chill.chill_image_tag }} links: - app:php + + {% if traefik_install %} labels: - "traefik.enable=true" - "traefik.docker.network=traefik" - - "traefik.http.routers.frontend-{{ item.chill_environment }}.rule=Host(`{{ item.host }}`)" - - "traefik.http.routers.frontend-{{ item.chill_environment }}.entrypoints=websecure" - {%+ if item.tls_config == 'self_signed' +%} - - "traefik.http.routers.frontend-{{ item.chill_environment }}.tls=true" + - "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' +%} + - "traefik.http.routers.frontend-{{ chill.chill_environment }}.tls=true" {%+ endif +%} - {%+ if item.expose_port is not false +%} - - "traefik.http.routers.frontend-exp-{{ item.chill_environment }}.rule=PathPrefix(`/`)" - - "traefik.http.routers.frontend-exp-{{ item.chill_environment }}.entrypoints=chill{{ item.chill_environment }}" - {%+ if item.tls_config == 'self_signed' +%} - - "traefik.http.routers.frontend-exp-{{ item.chill_environment }}.tls=true" + {%+ 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' +%} + - "traefik.http.routers.frontend-exp-{{ chill.chill_environment }}.tls=true" {%+ endif +%} {%+ endif +%} + {% endif %} + networks: + + {% if traefik_install %} - traefik + {% endif %} + - default restart: always app: &defaultApp - image: {{ registry_url }}/{{ registry_project }}/{{ chill_image_php_name }}:{{ item.chill_image_tag }} + image: {{ registry_url }}/{{ registry_project }}/{{ chill_image_php_name }}:{{ chill.chill_image_tag }} env_file: - env_file.env volumes: - './config/prod:/var/www/app/config/packages/prod:ro' - '/var/log/chill:/var/www/app/var/log:rw' - - '{{ doc_storage_dir }}/{{ item['chill_environment'] }}:/var/storage:rw' + - '{{ doc_storage_dir }}/{{ chill['chill_environment'] }}:/var/storage:rw' links: - redis - relatorio - rabbitmq - {% if item.add_postgres -%} + + {% if chill.add_postgres -%} - database {%- endif %} @@ -71,7 +80,7 @@ services: command: ["bin/console", "chill:cron-job:execute", "-v"] restart: "no" - {% if item.add_postgres %} + {% if chill.add_postgres %} database: image: "{{ database_image }}" @@ -137,6 +146,10 @@ services: restart: always networks: + + {% if traefik_install %} traefik: external: true + {% endif %} + default: \ No newline at end of file diff --git a/templates/env_file.env b/templates/env_file.env index b7992a8..427803e 100644 --- a/templates/env_file.env +++ b/templates/env_file.env @@ -8,39 +8,40 @@ REDIS_PORT=6379 REDIS_URL=redis://redis:6379 RELATORIO_HOST=relatorio RELATORIO_PORT=8888 -TRUSTED_HOSTS={{ item.chill_config.trusted_hosts }} -DATABASE_HOST={{ item.chill_config.database_host }} -DATABASE_PORT={{ item.chill_config.database_port }} -DATABASE_NAME={{ item.chill_config.database_name }} -DATABASE_USER={{ item.chill_config.database_user }} -DATABASE_VERSION={{ item.chill_config.database_version }} +TRUSTED_HOSTS={{ chill.chill_config.trusted_hosts }} +DATABASE_HOST={{ chill.chill_config.database_host }} +DATABASE_PORT={{ chill.chill_config.database_port }} +DATABASE_NAME={{ chill.chill_config.database_name }} +DATABASE_USER={{ chill.chill_config.database_user }} +DATABASE_VERSION={{ chill.chill_config.database_version }} LOCALE=fr MAILER_PROTOCOL=smtp -MAILER_USER={{ item.chill_config.mailer_user }} -MAILER_HOST={{ item.chill_config.mailer_host }} -MAILER_PORT={{ item.chill_config.mailer_port }} -NOTIFICATION_HOST={{ item.chill_config.notification_host }} -NOTIFICATION_FROM_EMAIL={{ item.chill_config.notification_from_email }} +MAILER_USER={{ chill.chill_config.mailer_user }} +MAILER_HOST={{ chill.chill_config.mailer_host }} +MAILER_PORT={{ chill.chill_config.mailer_port }} +NOTIFICATION_HOST={{ chill.chill_config.notification_host }} +NOTIFICATION_FROM_EMAIL={{ chill.chill_config.notification_from_email }} ASYNC_UPLOAD_TEMP_URL_BASE_PATH= ASYNC_UPLOAD_TEMP_URL_CONTAINER= ASYNC_UPLOAD_TEMP_URL_KEY= DEFAULT_CARRIER_CODE=FR -APP_SECRET={{ item.chill_config.app_secret }} -ADMIN_PASSWORD={{ item.chill_config.admin_password }} -{% if item.chill_config.admin_password_1 is defined -%} -ADMIN_PASSWORD_1={{ item.chill_config.admin_password_1 }} +APP_SECRET={{ chill.chill_config.app_secret }} +ADMIN_PASSWORD={{ chill.chill_config.admin_password }} +{% if chill.chill_config.admin_password_1 is defined -%} +ADMIN_PASSWORD_1={{ chill.chill_config.admin_password_1 }} {% endif -%} -{% if item.chill_config.admin_password_2 is defined -%} -ADMIN_PASSWORD_2={{ item.chill_config.admin_password_2 }} +{% if chill.chill_config.admin_password_2 is defined -%} +ADMIN_PASSWORD_2={{ chill.chill_config.admin_password_2 }} {% endif -%} -{% if item.chill_config.admin_password_3 is defined -%} -ADMIN_PASSWORD_3={{ item.chill_config.admin_password_3 }} +{% if chill.chill_config.admin_password_3 is defined -%} +ADMIN_PASSWORD_3={{ chill.chill_config.admin_password_3 }} {% endif -%} -MAILER_DSN={{ item.chill_config.mailer_dsn }} -MAILER_URL={{ item.chill_config.mailer_url }} -JWT_PASSPHRASE={{ item.chill_config.jwt_passphrase }} -JWT_SECRET_KEY={{ item.chill_config.jwt_secret_key }} -JWT_PUBLIC_KEY={{ item.chill_config.jwt_public_key }} -RABBITMQ_URL=amqp://{{ item.chill_config.rabbitmq_user }}:{{ item.chill_config.rabbitmq_password }}@rabbitmq/%2f -DATABASE_URL=postgres://{{ item.chill_config.database_user }}:{{ item.chill_config.database_password }}@{% if item.add_postgres %}database:5432{% else %}{{ item.chill_config.database_host }}{% endif %}/{{ item.chill_config.database_name }}?sslmode=prefer&charset=utf8&serverVersion={{ item.chill_config.database_version }} -EDITOR_SERVER={{ item.chill_config.editor_server }} +MAILER_DSN={{ chill.chill_config.mailer_dsn }} +MAILER_URL={{ chill.chill_config.mailer_url }} +JWT_PASSPHRASE={{ chill.chill_config.jwt_passphrase }} +JWT_SECRET_KEY={{ chill.chill_config.jwt_secret_key }} +JWT_PUBLIC_KEY={{ chill.chill_config.jwt_public_key }} +RABBITMQ_URL=amqp://{{ chill.chill_config.rabbitmq_user }}:{{ chill.chill_config.rabbitmq_password }}@rabbitmq/%2f +DATABASE_URL=postgres://{{ chill.chill_config.database_user }}:{{ chill.chill_config.database_password }}@{% if chill.add_postgres %}database:5432{% else %}{{ chill.chill_config.database_host }}{% endif %}/{{ chill.chill_config.database_name }}?sslmode=prefer&charset=utf8&serverVersion={{ chill.chill_config.database_version }} +EDITOR_SERVER={{ chill.chill_config.editor_server }} +OVHCLOUD_DSN={{ chill.chill_config.ovhcloud_dsn }} -- 2.54.1 From 655d0cfbcf9f025f94ea06934dcd03d62b38ac55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 20 Jan 2026 17:07:13 +0100 Subject: [PATCH 03/17] Disable `expose_port` for chill configuration in defaults/main.yml --- defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index a3e6afb..188e801 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -20,7 +20,7 @@ default_chill: chill_image_tag: v0.0.1-beta host: 'devpms.samusocial.be' tls_config: self_signed - expose_port: 8010 # can be false, or the port number + expose_port: false # can be false, or the port number chill_config: trusted_hosts: 'devpms.samusocial.be ' database_host: '172.17.17.71' -- 2.54.1 From 92ca7f27ab7728fd6dd2ecc8bc5846e2cecd159a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 20 Jan 2026 17:07:42 +0100 Subject: [PATCH 04/17] Add optional port exposure for chill service in compose.yaml --- templates/compose.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/templates/compose.yaml b/templates/compose.yaml index fa65a1e..ce3a10e 100644 --- a/templates/compose.yaml +++ b/templates/compose.yaml @@ -24,6 +24,11 @@ services: {%+ endif +%} {% endif %} + {% if chill.expose_port is not false +%} + ports: + - "{{ chill.expose_port }}:80" + {%+ endif %} + networks: {% if traefik_install %} -- 2.54.1 From 38a3d4489723e4fc27d72498bebfe94b9d6e474c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Fri, 23 Jan 2026 08:56:47 +0100 Subject: [PATCH 05/17] Update monolog configuration to use dynamic log prefix and add error log handler Revised `monolog.yaml` to replace static `log_prefix` with `chill_environment` variable and added a new `errors_log` handler. Expanded exclusion channels in default handler to include `deprecation`. --- templates/config/prod/monolog.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/templates/config/prod/monolog.yaml b/templates/config/prod/monolog.yaml index 957d1f4..75b0de5 100644 --- a/templates/config/prod/monolog.yaml +++ b/templates/config/prod/monolog.yaml @@ -6,7 +6,7 @@ # parameters: - log_prefix: 'test' + log_prefix: '{{ chill.chill_environment }}' monolog: # make a "notifier" channel available channels: ['notifier'] @@ -16,6 +16,10 @@ monolog: path: "%kernel.logs_dir%/notifier-%log_prefix%.log" level: info channels: [ 'notifier' ] + errors_log: + type: stream + path: "%kernel.logs_dir%/error-%log_prefix%.log" + level: error privacy_log: type: stream path: "%kernel.logs_dir%/privacy-%log_prefix%.log" @@ -25,7 +29,7 @@ monolog: type: stream path: "%kernel.logs_dir%/default-%log_prefix%.log" level: info - channels: [ '!event', '!doctrine', '!console', '!chill',] + channels: [ '!event', '!doctrine', '!console', '!chill', '!deprecation'] console: type: console process_psr_3_messages: false -- 2.54.1 From 43a8ccff28094cff9ea3a7afefc27902793a33ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 27 Jan 2026 16:21:34 +0100 Subject: [PATCH 06/17] Make RabbitMQ integration optional in Chill configuration Introduced a new `rabbitmq_install` variable to conditionally enable RabbitMQ components in `compose.yaml`, `messenger.yaml`, and `env_file.env`. Updated related Ansible tasks to respect this variable. --- tasks/chill/main.yml | 1 + templates/compose.yaml | 4 ++++ templates/config/prod/messenger.yaml | 5 +++++ templates/env_file.env | 2 ++ 4 files changed, 12 insertions(+) diff --git a/tasks/chill/main.yml b/tasks/chill/main.yml index 3b968b0..64a419b 100644 --- a/tasks/chill/main.yml +++ b/tasks/chill/main.yml @@ -36,6 +36,7 @@ dest: "{{ install_dir }}/{{ chill['chill_environment'] }}/rabbitmq.env" owner: "{{ as_user }}" mode: '0400' + when: chill.rabbitmq_install - name: Create directory for storing configuration ansible.builtin.file: diff --git a/templates/compose.yaml b/templates/compose.yaml index ce3a10e..3625997 100644 --- a/templates/compose.yaml +++ b/templates/compose.yaml @@ -49,7 +49,9 @@ services: links: - redis - relatorio + {% if chill.rabbitmq_install +%} - rabbitmq + {%+ endif %} {% if chill.add_postgres -%} - database @@ -137,6 +139,7 @@ services: # rabbitmq: # condition: service_healthy + {% if chill.rabbitmq_install +%} rabbitmq: image: "{{ chill_image_rabbitmq }}" env_file: @@ -149,6 +152,7 @@ services: networks: - default restart: always + {% endif %} networks: diff --git a/templates/config/prod/messenger.yaml b/templates/config/prod/messenger.yaml index 856c9ab..c66af65 100644 --- a/templates/config/prod/messenger.yaml +++ b/templates/config/prod/messenger.yaml @@ -2,6 +2,7 @@ framework: messenger: transports: + {% if chill.rabbitmq_install +%} async: dsn: '%env(RABBITMQ_URL)%/async' options: @@ -12,5 +13,9 @@ framework: async: ~ auto_setup: true priority: '%env(RABBITMQ_URL)%/priority' + {% else +%} + async: 'doctrine://default' + priority: 'doctrine://default' + {% endif +%} failed: 'doctrine://default?queue_name=failed' sync: 'sync://' \ No newline at end of file diff --git a/templates/env_file.env b/templates/env_file.env index 427803e..c8feec4 100644 --- a/templates/env_file.env +++ b/templates/env_file.env @@ -41,7 +41,9 @@ MAILER_URL={{ chill.chill_config.mailer_url }} JWT_PASSPHRASE={{ chill.chill_config.jwt_passphrase }} JWT_SECRET_KEY={{ chill.chill_config.jwt_secret_key }} JWT_PUBLIC_KEY={{ chill.chill_config.jwt_public_key }} +{% if chill.rabbitmq_install %} RABBITMQ_URL=amqp://{{ chill.chill_config.rabbitmq_user }}:{{ chill.chill_config.rabbitmq_password }}@rabbitmq/%2f +{% endif %} DATABASE_URL=postgres://{{ chill.chill_config.database_user }}:{{ chill.chill_config.database_password }}@{% if chill.add_postgres %}database:5432{% else %}{{ chill.chill_config.database_host }}{% endif %}/{{ chill.chill_config.database_name }}?sslmode=prefer&charset=utf8&serverVersion={{ chill.chill_config.database_version }} EDITOR_SERVER={{ chill.chill_config.editor_server }} OVHCLOUD_DSN={{ chill.chill_config.ovhcloud_dsn }} -- 2.54.1 From 93c453420428c0593adb53f6b04d7329606bb2ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 27 Jan 2026 16:21:52 +0100 Subject: [PATCH 07/17] Make proxy IP configuration dynamic and expand RabbitMQ settings Added a new `proxy_ips` variable for flexible proxy IP configuration in Chill defaults and updated framework template. Enhanced RabbitMQ integration with a conditional `rabbitmq_install` option. --- defaults/main.yml | 7 +++++++ templates/config/prod/framework.yaml | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index 188e801..b054736 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -21,6 +21,13 @@ default_chill: host: 'devpms.samusocial.be' tls_config: self_signed expose_port: false # can be false, or the port number + # use rabbitmq as message broker. If not in use, it will be replaced by doctrine + rabbitmq_install: true + proxy_ips: + # 127.0.0.1 is always added + - 192.168.0.0/16 + - 10.0.0.0/8 + - 172.16.0.0/12 chill_config: trusted_hosts: 'devpms.samusocial.be ' database_host: '172.17.17.71' diff --git a/templates/config/prod/framework.yaml b/templates/config/prod/framework.yaml index 0fb2cea..937b448 100644 --- a/templates/config/prod/framework.yaml +++ b/templates/config/prod/framework.yaml @@ -1,7 +1,11 @@ # this file is managed by ansible. Do not edit it by hand framework: + {% if traefik_install +%} trusted_proxies: '127.0.0.1,REMOTE_ADDR{% for ip in traefik_trusted_ips|default([]) %},{{ ip }}{% endfor %}' + {%+ else %} + trusted_proxies: '127.0.0.1,{% for ip in chill.proxy_ips %}{{ ip }}{% if not loop.last %},{% endif %}{% endfor %}' + {%+ endif %} trusted_headers: ['x-forwarded-for', 'x-forwarded-host', 'x-forwarded-proto', 'x-forwarded-port'] parameters: -- 2.54.1 From 9904b9a03833bf831eecff58cfd81fc851341986 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 27 Jan 2026 16:21:58 +0100 Subject: [PATCH 08/17] Separate deprecation logs into a dedicated handler and adjust console log level to error --- templates/config/prod/monolog.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/templates/config/prod/monolog.yaml b/templates/config/prod/monolog.yaml index 75b0de5..6079749 100644 --- a/templates/config/prod/monolog.yaml +++ b/templates/config/prod/monolog.yaml @@ -29,9 +29,15 @@ monolog: type: stream path: "%kernel.logs_dir%/default-%log_prefix%.log" level: info - channels: [ '!event', '!doctrine', '!console', '!chill', '!deprecation'] + channels: [ '!event', '!doctrine', '!console', '!chill' ] + deprecation_log: + type: stream + path: "%kernel.logs_dir%/deprecation-%log_prefix%.log" + level: info + channels: [ 'deprecation' ] console: type: console process_psr_3_messages: false - channels: [ '!event', '!doctrine', '!console'] + level: error + channels: [ '!event', '!doctrine', '!console', '!deprecation'] bubble: true -- 2.54.1 From 3f99ea7fcd663e8b7aaa3238a3734d5a8372ed3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Fri, 13 Mar 2026 12:58:11 +0100 Subject: [PATCH 09/17] Add support for supplementary environment values in Chill configuration Introduced `supplementary_environment_values` in Chill defaults and updated `env_file.env` template to dynamically inject custom environment variables. Added placeholder `docker_secrets` for future secrets management. --- defaults/main.yml | 4 ++++ templates/env_file.env | 3 +++ 2 files changed, 7 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index b054736..222a42c 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -13,6 +13,8 @@ traefik_image_traefik: "traefik:v3.2" # to install or not traefik as front-end traefik_install: true +docker_secrets: [] + # default chill config for each environment default_chill: chill_environment: main_env @@ -29,6 +31,8 @@ default_chill: - 10.0.0.0/8 - 172.16.0.0/12 chill_config: + # supplementary environment values to set in the in the env file + supplementary_environment_values: {} trusted_hosts: 'devpms.samusocial.be ' database_host: '172.17.17.71' database_port: '5432' diff --git a/templates/env_file.env b/templates/env_file.env index c8feec4..18e42b0 100644 --- a/templates/env_file.env +++ b/templates/env_file.env @@ -47,3 +47,6 @@ RABBITMQ_URL=amqp://{{ chill.chill_config.rabbitmq_user }}:{{ chill.chill_config DATABASE_URL=postgres://{{ chill.chill_config.database_user }}:{{ chill.chill_config.database_password }}@{% if chill.add_postgres %}database:5432{% else %}{{ chill.chill_config.database_host }}{% endif %}/{{ chill.chill_config.database_name }}?sslmode=prefer&charset=utf8&serverVersion={{ chill.chill_config.database_version }} EDITOR_SERVER={{ chill.chill_config.editor_server }} OVHCLOUD_DSN={{ chill.chill_config.ovhcloud_dsn }} +{% for k, v in chill.chill_config.supplementary_environment_values.items() %} +{{ k }}="{{ v }}" +{% endfor %} -- 2.54.1 From 8ccb88503a75b4998a95b16a8a5d2dff0201b5c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Sat, 18 Apr 2026 01:00:36 +0200 Subject: [PATCH 10/17] Update messenger consumer shell command for preserved environment variables Replaced `su` with `su -p` in `compose.yaml` to ensure the environment variables of the parent shell are preserved when running the messenger consumer. --- templates/compose.yaml | 2 +- templates/config/prod/messenger.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/compose.yaml b/templates/compose.yaml index 3625997..5f4691b 100644 --- a/templates/compose.yaml +++ b/templates/compose.yaml @@ -73,7 +73,7 @@ services: sleep 3 && bin/console cache:clear && while ! [ -f /tmp/kill_me ]; do - su -s /bin/bash -c 'php -d memory_limit=2G bin/console messenger:consume priority async --limit=20 --time-limit=600 -v' "www-data"; + su -p -s /bin/bash -c 'php -d memory_limit=2G bin/console messenger:consume priority async --limit=20 --time-limit=600 -v' "www-data"; done; pre_stop: - command: diff --git a/templates/config/prod/messenger.yaml b/templates/config/prod/messenger.yaml index c66af65..8859c0a 100644 --- a/templates/config/prod/messenger.yaml +++ b/templates/config/prod/messenger.yaml @@ -18,4 +18,4 @@ framework: priority: 'doctrine://default' {% endif +%} failed: 'doctrine://default?queue_name=failed' - sync: 'sync://' \ No newline at end of file + sync: 'sync://' -- 2.54.1 From 0dcd51b601487faa477946fd771355c1a49da11c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Fri, 15 May 2026 15:15:24 +0200 Subject: [PATCH 11/17] adapt role: the image should not be run as root, but with user with id 82. --- defaults/main.yml | 2 +- tasks/chill/main.yml | 8 ++++---- templates/compose.yaml | 2 +- templates/config/prod/monolog.yaml | 6 ++---- templates/logrotate/chill | 17 ++++------------- 5 files changed, 12 insertions(+), 23 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 222a42c..9a91fa3 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -54,5 +54,5 @@ default_chill: # jwt_public_key: '1234' rabbitmq_user: 'chilldev' # rabbitmq_password: - editor_server: 'https://collabora.samusocial.be' + editor_server: 'https://collabora.champs-libres.be' ovhcloud_dsn: 'null://null' \ No newline at end of file diff --git a/tasks/chill/main.yml b/tasks/chill/main.yml index 64a419b..621b6fe 100644 --- a/tasks/chill/main.yml +++ b/tasks/chill/main.yml @@ -42,15 +42,15 @@ ansible.builtin.file: path: "{{ install_dir }}/{{ chill['chill_environment'] }}/config/prod" state: directory - owner: "{{ as_user }}" - mode: '0400' + owner: "82" + mode: '0500' - name: Copy configuration files ansible.builtin.template: src: "config/prod/{{ file }}" dest: "{{ install_dir }}/{{ chill['chill_environment'] }}/config/prod/{{ file }}" - owner: "{{ as_user }}" - mode: '0444' + owner: "82" + mode: '0400' loop: - lexik_jwt_authentication.yaml - messenger.yaml diff --git a/templates/compose.yaml b/templates/compose.yaml index 5f4691b..fdca046 100644 --- a/templates/compose.yaml +++ b/templates/compose.yaml @@ -73,7 +73,7 @@ services: sleep 3 && bin/console cache:clear && while ! [ -f /tmp/kill_me ]; do - su -p -s /bin/bash -c 'php -d memory_limit=2G bin/console messenger:consume priority async --limit=20 --time-limit=600 -v' "www-data"; + php -d memory_limit=2G bin/console messenger:consume priority async --limit=40 --time-limit=600 -v; done; pre_stop: - command: diff --git a/templates/config/prod/monolog.yaml b/templates/config/prod/monolog.yaml index 6079749..fb0311f 100644 --- a/templates/config/prod/monolog.yaml +++ b/templates/config/prod/monolog.yaml @@ -29,11 +29,9 @@ monolog: type: stream path: "%kernel.logs_dir%/default-%log_prefix%.log" level: info - channels: [ '!event', '!doctrine', '!console', '!chill' ] + channels: [ '!event', '!doctrine', '!console', '!chill', '!deprecation'] deprecation_log: - type: stream - path: "%kernel.logs_dir%/deprecation-%log_prefix%.log" - level: info + type: 'null' channels: [ 'deprecation' ] console: type: console diff --git a/templates/logrotate/chill b/templates/logrotate/chill index 5fb3b42..662a054 100644 --- a/templates/logrotate/chill +++ b/templates/logrotate/chill @@ -1,26 +1,17 @@ -/var/log/chill/default-*.log { +/var/log/chill/*.log { su php-fpm php-fpm - rotate 90 daily compress missingok notifempty + copytruncate + rotate 90 } /var/log/chill/privacy-*.log { - su php-fpm php-fpm rotate 180 - daily - compress - missingok - notifempty } /var/log/chill/notifier-*.log { - su php-fpm php-fpm rotate 800 - daily - compress - missingok - notifempty -} +} \ No newline at end of file -- 2.54.1 From 32a6a31094481dd2303a32bfd32d934712f921ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Fri, 5 Jun 2026 13:15:19 +0200 Subject: [PATCH 12/17] Update directory permissions in Chill role to 0777 for data storage --- tasks/chill/main.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tasks/chill/main.yml b/tasks/chill/main.yml index 621b6fe..a8c93b8 100644 --- a/tasks/chill/main.yml +++ b/tasks/chill/main.yml @@ -63,9 +63,7 @@ - name: Create directory for storing data ansible.builtin.file: path: "{{ doc_storage_dir }}/{{ chill['chill_environment'] }}" - owner: "82" - group: "82" - mode: '0766' + mode: '0777' state: directory # racing condition: on first execution, this is not available... -- 2.54.1 From 2278378e30d1916d5db5d72114a31910cad4613e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 15 Sep 2026 15:16:57 +0200 Subject: [PATCH 13/17] Make `default_carrier_code` configurable in Chill defaults and update `env_file.env` template to use dynamic variable --- defaults/main.yml | 3 ++- templates/env_file.env | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 9a91fa3..96dcde6 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -55,4 +55,5 @@ default_chill: rabbitmq_user: 'chilldev' # rabbitmq_password: editor_server: 'https://collabora.champs-libres.be' - ovhcloud_dsn: 'null://null' \ No newline at end of file + ovhcloud_dsn: 'null://null' + default_carrier_code: 'FR' \ No newline at end of file diff --git a/templates/env_file.env b/templates/env_file.env index 18e42b0..3c655f1 100644 --- a/templates/env_file.env +++ b/templates/env_file.env @@ -24,7 +24,7 @@ NOTIFICATION_FROM_EMAIL={{ chill.chill_config.notification_from_email }} ASYNC_UPLOAD_TEMP_URL_BASE_PATH= ASYNC_UPLOAD_TEMP_URL_CONTAINER= ASYNC_UPLOAD_TEMP_URL_KEY= -DEFAULT_CARRIER_CODE=FR +DEFAULT_CARRIER_CODE={{ chill.chill_config.default_carrier_code }} APP_SECRET={{ chill.chill_config.app_secret }} ADMIN_PASSWORD={{ chill.chill_config.admin_password }} {% if chill.chill_config.admin_password_1 is defined -%} -- 2.54.1 From c699983b80ef2bf9cfe7f8150f1219469e4c92b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Wed, 18 Nov 2026 15:25:34 +0100 Subject: [PATCH 14/17] Add optional mount of template overrides and use `chill` in env templates - add `load_template_override` (default false) to `default_chill`: controls the creation and the mount of the `templates` directory - use `chill.chill_config` instead of `item.chill_config` in env_file.env, rabbitmq.env and postgres.env Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01VnXP3D1srf5k8MrtPFUz93 --- defaults/main.yml | 2 ++ tasks/chill/main.yml | 8 ++++++++ templates/compose.yaml | 2 ++ templates/env_file.env | 8 ++++---- templates/postgres.env | 6 +++--- templates/rabbitmq.env | 4 ++-- 6 files changed, 21 insertions(+), 9 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 96dcde6..dc497e3 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -25,6 +25,8 @@ default_chill: expose_port: false # can be false, or the port number # use rabbitmq as message broker. If not in use, it will be replaced by doctrine rabbitmq_install: true + # mount the directory 'templates' (twig overrides) into the app containers. false = do not mount + load_template_override: false proxy_ips: # 127.0.0.1 is always added - 192.168.0.0/16 diff --git a/tasks/chill/main.yml b/tasks/chill/main.yml index a8c93b8..6d7f9f0 100644 --- a/tasks/chill/main.yml +++ b/tasks/chill/main.yml @@ -45,6 +45,14 @@ owner: "82" mode: '0500' +- name: Create directory for template overrides (mounted in the app container) + ansible.builtin.file: + path: "{{ install_dir }}/{{ chill['chill_environment'] }}/templates" + state: directory + mode: '0755' + owner: "{{ as_user }}" + when: chill.load_template_override + - name: Copy configuration files ansible.builtin.template: src: "config/prod/{{ file }}" diff --git a/templates/compose.yaml b/templates/compose.yaml index 2bf9406..644f89f 100644 --- a/templates/compose.yaml +++ b/templates/compose.yaml @@ -50,7 +50,9 @@ 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 +%} - './templates:/var/www/app/templates:ro' + {%+ endif %} - '{{ doc_storage_dir }}/{{ chill['chill_environment'] }}:/var/storage:rw' links: - redis diff --git a/templates/env_file.env b/templates/env_file.env index 28d94b2..53b2331 100644 --- a/templates/env_file.env +++ b/templates/env_file.env @@ -36,11 +36,11 @@ ADMIN_PASSWORD_2={{ chill.chill_config.admin_password_2 }} {% if chill.chill_config.admin_password_3 is defined -%} ADMIN_PASSWORD_3={{ chill.chill_config.admin_password_3 }} {% endif -%} -{% if item.chill_config.admin_password_4 is defined -%} -ADMIN_PASSWORD_4={{ item.chill_config.admin_password_4 }} +{% if chill.chill_config.admin_password_4 is defined -%} +ADMIN_PASSWORD_4={{ chill.chill_config.admin_password_4 }} {% endif -%} -{% if item.chill_config.admin_password_5 is defined -%} -ADMIN_PASSWORD_5={{ item.chill_config.admin_password_5 }} +{% if chill.chill_config.admin_password_5 is defined -%} +ADMIN_PASSWORD_5={{ chill.chill_config.admin_password_5 }} {% endif -%} MAILER_DSN={{ chill.chill_config.mailer_dsn }} MAILER_URL={{ chill.chill_config.mailer_url }} diff --git a/templates/postgres.env b/templates/postgres.env index b5b06f2..98140c1 100644 --- a/templates/postgres.env +++ b/templates/postgres.env @@ -1,4 +1,4 @@ # this file is managed by ansible. Do not edit it by hand -POSTGRES_DB={{ item.chill_config.database_name }} -POSTGRES_USER={{ item.chill_config.database_user }} -POSTGRES_PASSWORD={{ item.chill_config.database_password }} +POSTGRES_DB={{ chill.chill_config.database_name }} +POSTGRES_USER={{ chill.chill_config.database_user }} +POSTGRES_PASSWORD={{ chill.chill_config.database_password }} diff --git a/templates/rabbitmq.env b/templates/rabbitmq.env index f288e2f..a878b21 100644 --- a/templates/rabbitmq.env +++ b/templates/rabbitmq.env @@ -1,3 +1,3 @@ # this file is managed by ansible. Do not edit it by hand. -RABBITMQ_DEFAULT_USER={{ item.chill_config.rabbitmq_user }} -RABBITMQ_DEFAULT_PASS={{ item.chill_config.rabbitmq_password }} \ No newline at end of file +RABBITMQ_DEFAULT_USER={{ chill.chill_config.rabbitmq_user }} +RABBITMQ_DEFAULT_PASS={{ chill.chill_config.rabbitmq_password }} \ No newline at end of file -- 2.54.1 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 15/17] 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 -- 2.54.1 From 2dabbc05037638169612b17217ef076a47442b47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Fri, 20 Nov 2026 16:07:14 +0100 Subject: [PATCH 16/17] Fix indentation of rendered framework.yaml and messenger.yaml Jinja control tags are now at column 0 without whitespace modifiers, so no stray spaces are added before the following line (invalid YAML for trusted_headers when traefik_install is true). Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01VnXP3D1srf5k8MrtPFUz93 --- templates/config/prod/framework.yaml | 6 +++--- templates/config/prod/messenger.yaml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/templates/config/prod/framework.yaml b/templates/config/prod/framework.yaml index 937b448..309ff17 100644 --- a/templates/config/prod/framework.yaml +++ b/templates/config/prod/framework.yaml @@ -1,11 +1,11 @@ # this file is managed by ansible. Do not edit it by hand framework: - {% if traefik_install +%} +{% if traefik_install %} trusted_proxies: '127.0.0.1,REMOTE_ADDR{% for ip in traefik_trusted_ips|default([]) %},{{ ip }}{% endfor %}' - {%+ else %} +{% else %} trusted_proxies: '127.0.0.1,{% for ip in chill.proxy_ips %}{{ ip }}{% if not loop.last %},{% endif %}{% endfor %}' - {%+ endif %} +{% endif %} trusted_headers: ['x-forwarded-for', 'x-forwarded-host', 'x-forwarded-proto', 'x-forwarded-port'] parameters: diff --git a/templates/config/prod/messenger.yaml b/templates/config/prod/messenger.yaml index 8859c0a..734f5f6 100644 --- a/templates/config/prod/messenger.yaml +++ b/templates/config/prod/messenger.yaml @@ -2,7 +2,7 @@ framework: messenger: transports: - {% if chill.rabbitmq_install +%} +{% if chill.rabbitmq_install %} async: dsn: '%env(RABBITMQ_URL)%/async' options: @@ -13,9 +13,9 @@ framework: async: ~ auto_setup: true priority: '%env(RABBITMQ_URL)%/priority' - {% else +%} +{% else %} async: 'doctrine://default' priority: 'doctrine://default' - {% endif +%} +{% endif %} failed: 'doctrine://default?queue_name=failed' sync: 'sync://' -- 2.54.1 From e3b8d2a5b3f52529d0859ad8ef32e3fd7c91b362 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Fri, 20 Nov 2026 16:59:31 +0100 Subject: [PATCH 17/17] Remove one-off containers after sending short messages `docker compose run` creates a new container on each execution, which accumulated (`-cron-run-`). Use `--rm` to remove it at the end. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01VnXP3D1srf5k8MrtPFUz93 --- templates/systemd/chill-send-sms@.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/systemd/chill-send-sms@.service b/templates/systemd/chill-send-sms@.service index 25d4283..285d7b2 100644 --- a/templates/systemd/chill-send-sms@.service +++ b/templates/systemd/chill-send-sms@.service @@ -3,7 +3,7 @@ Description=Execute send-short-messages for chill with environment %i [Service] User={{ as_user }} -ExecStart=/usr/bin/docker compose --file {{ install_dir }}/%i/compose.yaml run cron bin/console chill:calendar:send-short-messages +ExecStart=/usr/bin/docker compose --file {{ install_dir }}/%i/compose.yaml run --rm cron bin/console chill:calendar:send-short-messages Type=simple # execute maximum 30 minutes RuntimeMaxSec=1800 \ No newline at end of file -- 2.54.1