12 lines
622 B
Django/Jinja

{# This template needs to be included in docker-compose.yml containers #}
networks:
{% if applications | get_app_conf(application_id, 'features.central_database', False) and database_type is defined %}
{{ applications | get_app_conf('svc-db-' ~ database_type, 'docker.network') }}:
{% endif %}
{% if applications | get_app_conf(application_id, 'features.ldap', False) and applications | get_app_conf('svc-db-openldap', 'network.docker') %}
{{ applications | get_app_conf('svc-db-openldap', 'docker.network') }}:
{% endif %}
{% if application_id != 'svc-db-openldap' %}
default:
{% endif %}
{{ "\n" }}