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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VnXP3D1srf5k8MrtPFUz93
This commit is contained in:
1 parent
7e0847d1c5
commit
c699983b80
6 files changed
+21
-9
No files matched your search
@@ -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
|
||||
|
||||
@@ -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 }}"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 }}
|
||||
|
||||
@@ -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 }}
|
||||
@@ -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 }}
|
||||
RABBITMQ_DEFAULT_USER={{ chill.chill_config.rabbitmq_user }}
|
||||
RABBITMQ_DEFAULT_PASS={{ chill.chill_config.rabbitmq_password }}
|
||||
Reference in new issue
Block a user