diff --git a/roles/cmp-rdbms/templates/services/mariadb.yml.j2 b/roles/cmp-rdbms/templates/services/mariadb.yml.j2 index b61dbc1f..0faddb93 100644 --- a/roles/cmp-rdbms/templates/services/mariadb.yml.j2 +++ b/roles/cmp-rdbms/templates/services/mariadb.yml.j2 @@ -1,7 +1,8 @@ -# This template needs to be included in docker-compose.yml, which depend on a mariadb database +{# This template needs to be included in docker-compose.yml, which depend on a mariadb database #} {% if not applications | get_app_conf(application_id, 'features.central_database', False) %} + {{ database_host }}: - container_name: {{application_id}}-database + container_name: {{ application_id | get_entity_name }}-database logging: driver: journald image: mariadb diff --git a/roles/cmp-rdbms/templates/services/postgres.yml.j2 b/roles/cmp-rdbms/templates/services/postgres.yml.j2 index 5a107007..3b6d8d39 100644 --- a/roles/cmp-rdbms/templates/services/postgres.yml.j2 +++ b/roles/cmp-rdbms/templates/services/postgres.yml.j2 @@ -1,8 +1,9 @@ -# This template needs to be included in docker-compose.yml, which depend on a postgres database +{# This template needs to be included in docker-compose.yml, which depend on a postgres database #} + {% if not applications | get_app_conf(application_id, 'features.central_database', False) %} {{ database_host }}: image: postgres:{{applications['svc-db-postgres'].version}}-alpine - container_name: {{application_id}}-database + container_name: {{ application_id | get_entity_name }}-database env_file: - {{database_env}} restart: {{docker_restart_policy}}