Files
computer-playbook/roles/web-app-suitecrm/templates/docker-compose.yml.j2
Kevin Veen-Birkenbach 4f48cf633b Add dynamic PHP error handling config for SuiteCRM:
- Introduce env-aware php.ini.j2 template
- Mount PHP config into container via docker-compose
- Add SUITECRM_PHP_CONFIG_HOST and SUITECRM_WELL_SOFTWARE_NAME variables
- Refactor LDAP extension path using normalized software name

https://chatgpt.com/share/69284194-cf6c-800f-b138-eb6ddf25592c
2025-11-27 13:18:50 +01:00

31 lines
1.2 KiB
Django/Jinja

{% include 'roles/docker-compose/templates/base.yml.j2' %}
{% set service_name = SUITECRM_SERVICE %}
{{ service_name }}:
{{ lookup('template', 'roles/docker-container/templates/build.yml.j2') | indent(4) }}
container_name: {{ SUITECRM_CONTAINER }}
image: "{{ SUITECRM_CUSTOM_IMAGE }}"
init: true
stop_signal: SIGTERM
stop_grace_period: 30s
{% include 'roles/docker-container/templates/base.yml.j2' %}
{% include 'roles/docker-container/templates/healthcheck/curl.yml.j2' %}
ports:
- "127.0.0.1:{{ ports.localhost.http[application_id] }}:80"
{% include 'roles/docker-container/templates/depends_on/dmbs_excl.yml.j2' %}
{% include 'roles/docker-container/templates/networks.yml.j2' %}
volumes:
- data:/var/www/html/
- "{{ SUITECRM_PHP_CONFIG_HOST }}:/usr/local/etc/php/conf.d/{{ SUITECRM_WELL_SOFTWARE_NAME }}.ini:ro"
{% if SUITECRM_LDAP_ENABLED | bool %}
# Readonly isn't possible for LDAP config, because otherwise file permission script will fail
- "{{ SUITECRM_LDAP_CONFIG_HOST }}:{{ SUITECRM_LDAP_EXTENSION_DIR }}/ldap.yaml"
{% endif %}
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
data:
name: {{ SUITECRM_DATA_VOLUME }}
{% include 'roles/docker-compose/templates/networks.yml.j2' %}