mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-09-24 19:16:26 +02:00
25 lines
1.1 KiB
Django/Jinja
25 lines
1.1 KiB
Django/Jinja
{# This template needs to be included in docker-compose.yml containers #}
|
|
networks:
|
|
{# Central RDMS-Database Network #}
|
|
{% if
|
|
(applications | get_app_conf(application_id, 'features.central_database', False) and database_type is defined) or
|
|
application_id in ['svc-db-mariadb','svc-db-postgres']
|
|
%}
|
|
{{ applications | get_app_conf('svc-db-' ~ database_type, 'docker.network') }}:
|
|
{% if application_id in ['svc-db-mariadb','svc-db-postgres'] %}
|
|
aliases:
|
|
- {{ database_type }}
|
|
{% endif %}
|
|
{% endif %}
|
|
{# Central LDAP Network #}
|
|
{% 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 %}
|
|
{# Central AI Network #}
|
|
{% if applications | get_app_conf(application_id, 'features.local_ai', False) %}
|
|
{{ applications | get_app_conf('svc-ai-ollama', 'docker.network') }}:
|
|
{% endif %}
|
|
{% if not application_id.startswith('svc-db-') and not application_id.startswith('svc-ai-') %}
|
|
default:
|
|
{% endif %}
|
|
{{ "\n" }} |