From d379d89ea379dc5515115be102eb36c87a2e7fa9 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Sun, 31 Dec 2023 11:44:21 +0100 Subject: [PATCH] Added more database conditions to template --- roles/docker-openproject/templates/docker-compose.yml.j2 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/roles/docker-openproject/templates/docker-compose.yml.j2 b/roles/docker-openproject/templates/docker-compose.yml.j2 index 9eba94d8..611a520b 100644 --- a/roles/docker-openproject/templates/docker-compose.yml.j2 +++ b/roles/docker-openproject/templates/docker-compose.yml.j2 @@ -5,7 +5,9 @@ networks: backend: volumes: +{% if not ( enable_central_database | lower | bool ) %} database: +{% endif %} data: x-op-restart-policy: &restart_policy @@ -28,7 +30,9 @@ x-op-app: &app IMAP_ENABLED: "${IMAP_ENABLED:-false}" volumes: - "data:/var/openproject/assets" +{% if not ( enable_central_database | lower | bool ) %} - "database:/var/openproject/pgdata" +{% endif %} services: @@ -58,8 +62,10 @@ services: - frontend volumes: - "data:/var/openproject/assets" +{% if not ( enable_central_database | lower | bool ) %} - "database:/var/openproject/pgdata" - +{% endif %} + web: <<: *app command: "./docker/prod/web"