From 275a2c35106c272b23bdfe331cd805a5f324d5c3 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Thu, 4 Jan 2024 11:36:55 +0100 Subject: [PATCH] Solved nextcloud bugs --- roles/docker-mailu/templates/docker-compose.yml.j2 | 2 ++ templates/docker-compose-networks.yml.j2 | 2 +- templates/docker-compose-volumes-just-database.yml.j2 | 2 +- templates/docker-compose-volumes.yml.j2 | 2 +- templates/docker-container-depends-on-also-database.yml.j2 | 2 +- templates/docker-container-depends-on-database-redis.yml.j2 | 2 +- templates/docker-container-depends-on-just-database.yml.j2 | 2 +- templates/docker-container-networks.yml.j2 | 2 +- templates/docker-service-mariadb.yml.j2 | 2 +- templates/docker-service-postgres.yml.j2 | 2 +- templates/docker-service-redis.yml.j2 | 2 +- 11 files changed, 12 insertions(+), 10 deletions(-) diff --git a/roles/docker-mailu/templates/docker-compose.yml.j2 b/roles/docker-mailu/templates/docker-compose.yml.j2 index 6800d478..a50b5aa4 100644 --- a/roles/docker-mailu/templates/docker-compose.yml.j2 +++ b/roles/docker-mailu/templates/docker-compose.yml.j2 @@ -54,7 +54,9 @@ services: - "dkim:/dkim" {% include 'templates/docker-container-depends-on-database-redis.yml.j2' %} resolver: + condition: service_started front: + condition: service_started logging: driver: journald dns: diff --git a/templates/docker-compose-networks.yml.j2 b/templates/docker-compose-networks.yml.j2 index c4fc368c..6f6c10d8 100644 --- a/templates/docker-compose-networks.yml.j2 +++ b/templates/docker-compose-networks.yml.j2 @@ -1,4 +1,3 @@ - # This template needs to be included in docker-compose.yml networks: {% if enable_central_database | bool %} @@ -6,3 +5,4 @@ networks: external: true {% endif %} {{docker_compose_project_name}}_network: +{{ "\n" }} \ No newline at end of file diff --git a/templates/docker-compose-volumes-just-database.yml.j2 b/templates/docker-compose-volumes-just-database.yml.j2 index e8a5daa0..d75a3dd5 100644 --- a/templates/docker-compose-volumes-just-database.yml.j2 +++ b/templates/docker-compose-volumes-just-database.yml.j2 @@ -1,6 +1,6 @@ - # This needs to be included in docker-compose.yml which just contain a database volume {% if not enable_central_database | bool %} volumes: database: {% endif %} +{{ "\n" }} \ No newline at end of file diff --git a/templates/docker-compose-volumes.yml.j2 b/templates/docker-compose-volumes.yml.j2 index 42fddfd9..af5026a5 100644 --- a/templates/docker-compose-volumes.yml.j2 +++ b/templates/docker-compose-volumes.yml.j2 @@ -1,6 +1,6 @@ - # This template needs to be included in docker-compose.yml which contain a database and additional volumes volumes: {% if not enable_central_database | bool %} database: {% endif %} +{{ "\n" }} \ No newline at end of file diff --git a/templates/docker-container-depends-on-also-database.yml.j2 b/templates/docker-container-depends-on-also-database.yml.j2 index 38901370..98e7356e 100644 --- a/templates/docker-container-depends-on-also-database.yml.j2 +++ b/templates/docker-container-depends-on-also-database.yml.j2 @@ -1,7 +1,7 @@ - # This template needs to be included in docker-compose.yml containers which depend on a database and additional containers depends_on: {% if not enable_central_database | bool %} database: condition: service_healthy {% endif %} +{{ "\n" }} \ No newline at end of file diff --git a/templates/docker-container-depends-on-database-redis.yml.j2 b/templates/docker-container-depends-on-database-redis.yml.j2 index 755a0171..f15a5cfb 100644 --- a/templates/docker-container-depends-on-database-redis.yml.j2 +++ b/templates/docker-container-depends-on-database-redis.yml.j2 @@ -1,4 +1,3 @@ - # This template needs to be included in docker-compose.yml contaienrs, which depend on a database, redis and optional additional volumes depends_on: {% if not enable_central_database | bool %} @@ -7,3 +6,4 @@ {% endif %} redis: condition: service_healthy +{{ "\n" }} \ No newline at end of file diff --git a/templates/docker-container-depends-on-just-database.yml.j2 b/templates/docker-container-depends-on-just-database.yml.j2 index 974c1172..19490a23 100644 --- a/templates/docker-container-depends-on-just-database.yml.j2 +++ b/templates/docker-container-depends-on-just-database.yml.j2 @@ -1,7 +1,7 @@ - # This template needs to be included in docker-compose.yml contaienrs, which just depend on a database {% if not enable_central_database | bool %} depends_on: database: condition: service_healthy {% endif %} +{{ "\n" }} \ No newline at end of file diff --git a/templates/docker-container-networks.yml.j2 b/templates/docker-container-networks.yml.j2 index a3d63af5..3ff0a631 100644 --- a/templates/docker-container-networks.yml.j2 +++ b/templates/docker-container-networks.yml.j2 @@ -1,7 +1,7 @@ - # This template needs to be included in docker-compose.yml containers networks: {{docker_compose_project_name}}_network: {% if enable_central_database | bool %} central_{{ database_type }}_network: {% endif %} +{{ "\n" }} \ No newline at end of file diff --git a/templates/docker-service-mariadb.yml.j2 b/templates/docker-service-mariadb.yml.j2 index 1b240bb0..c6bb1ce4 100644 --- a/templates/docker-service-mariadb.yml.j2 +++ b/templates/docker-service-mariadb.yml.j2 @@ -1,4 +1,3 @@ - # This template needs to be included in docker-compose.yml, which depend on a mariadb database {% if not enable_central_database | bool %} database: @@ -23,3 +22,4 @@ networks: - {{docker_compose_project_name}}_network {% endif %} +{{ "\n" }} \ No newline at end of file diff --git a/templates/docker-service-postgres.yml.j2 b/templates/docker-service-postgres.yml.j2 index e2ff4e69..a2c5b5ea 100644 --- a/templates/docker-service-postgres.yml.j2 +++ b/templates/docker-service-postgres.yml.j2 @@ -1,4 +1,3 @@ - # This template needs to be included in docker-compose.yml, which depend on a postgres database {% if not enable_central_database | bool %} database: @@ -21,3 +20,4 @@ networks: - {{docker_compose_project_name}}_network {% endif %} +{{ "\n" }} \ No newline at end of file diff --git a/templates/docker-service-redis.yml.j2 b/templates/docker-service-redis.yml.j2 index 0520b566..26d15317 100644 --- a/templates/docker-service-redis.yml.j2 +++ b/templates/docker-service-redis.yml.j2 @@ -1,4 +1,3 @@ - # This template needs to be included in docker-compose.yml, which depend on redis redis: image: redis:alpine @@ -14,3 +13,4 @@ retries: 30 networks: - {{docker_compose_project_name}}_network +{{ "\n" }} \ No newline at end of file