From 7c00ebe2df43e34981607a0dfee94965b79d2cb9 Mon Sep 17 00:00:00 2001 From: Eric Schubert <38206611+Kharonus@users.noreply.github.com> Date: Wed, 5 Jun 2024 12:58:08 +0200 Subject: [PATCH] [chore] extract volumes from app anchor (#74) - yaml anchors do not support merging of lists - to add specific volumes to a service, you cannot use an alias to include shared volumes - hence, every service should do the volume definition by itself, once there is a single service that has a specific volume next to the common ones --- compose/docker-compose.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/compose/docker-compose.yml b/compose/docker-compose.yml index 5709e2b..089e958 100644 --- a/compose/docker-compose.yml +++ b/compose/docker-compose.yml @@ -25,8 +25,6 @@ x-op-app: &app RAILS_MAX_THREADS: ${RAILS_MAX_THREADS:-16} # set to true to enable the email receiving feature. See ./docker/cron for more options IMAP_ENABLED: "${IMAP_ENABLED:-false}" - volumes: - - "${OPDATA:-opdata}:/var/openproject/assets" services: db: @@ -83,6 +81,7 @@ services: retries: 3 start_period: 30s volumes: + - "${OPDATA:-opdata}:/var/openproject/assets" - assets:/app/public autoheal: @@ -103,6 +102,8 @@ services: - db - cache - seeder + volumes: + - "${OPDATA:-opdata}:/var/openproject/assets" cron: <<: *app @@ -113,6 +114,8 @@ services: - db - cache - seeder + volumes: + - "${OPDATA:-opdata}:/var/openproject/assets" seeder: <<: *app @@ -120,4 +123,6 @@ services: restart: on-failure networks: - backend + volumes: + - "${OPDATA:-opdata}:/var/openproject/assets"