From a832e9573073bfdaf67e3b93abca1c7152240042 Mon Sep 17 00:00:00 2001 From: Kacper Donat Date: Sun, 12 Feb 2023 15:59:27 +0100 Subject: [PATCH] wipe: Fix reusing of same volume accross differnt instances --- services/wipe/stack.yml | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/services/wipe/stack.yml b/services/wipe/stack.yml index e79fe4b..b522915 100644 --- a/services/wipe/stack.yml +++ b/services/wipe/stack.yml @@ -25,31 +25,31 @@ services: pod.component.fpm: | image: registry.kadet.net/wipe/php-fpm:{{ wipe_version }} volumes: - - www-data:/var/www - - storage-data:/var/www/storage + - {{ service }}-www-data:/var/www + - {{ service }}-storage-data:/var/www/storage pod.component.nginx: | image: nginx:latest volumes: - - www-data:/var/www - - storage-data:/var/www/storage - - nginx-config:/etc/nginx/templates + - {{ service }}-www-data:/var/www + - {{ service }}-storage-data:/var/www/storage + - {{ service }}-nginx-config:/etc/nginx/templates pod.copy.fpm: /var/conf/wipe/.env:/var/www/.env pod.init.components: | - image: registry.kadet.net/wipe/php-fpm:{{ wipe_version }} entrypoint: ["/bin/sh", "-c"] command: ["cp -r /var/www/* /mnt/www"] volumes: - - www-data:/mnt/www + - {{ service }}-www-data:/mnt/www - image: registry.kadet.net/wipe/php-fpm:{{ wipe_version }} entrypoint: ["/bin/sh", "-c"] command: ["cp -rnp /var/www/storage/* /mnt/storage"] volumes: - - storage-data:/mnt/storage + - {{ service }}-storage-data:/mnt/storage - image: registry.kadet.net/wipe/php-fpm:{{ wipe_version }} entrypoint: ["/bin/sh", "-c"] command: ["cp -r /var/www/nginx/* /mnt/config"] volumes: - - nginx-config:/mnt/config + - {{ service }}-nginx-config:/mnt/config configs: - source: dotenv_{{ dotenv_file.checksum }} target: /var/conf/wipe/.env @@ -73,14 +73,13 @@ configs: volumes: nginx-config: - name: '{{ "nginx-config.{{.Task.ID}}" }}' + name: '{{ service }}-{{ "nginx-config.{{.Task.ID}}" }}' labels: - com.github.rycus86.podlike.volume-ref: nginx-config + com.github.rycus86.podlike.volume-ref: "{{ service }}-nginx-config" www-data: - name: '{{ "www-data.{{.Task.ID}}" }}' + name: '{{ service }}-{{ "www-data.{{.Task.ID}}" }}' labels: - com.github.rycus86.podlike.volume-ref: www-data + com.github.rycus86.podlike.volume-ref: "{{ service }}-www-data" storage-data: - name: '{{ "www-data.{{.Task.ID}}" }}' labels: - com.github.rycus86.podlike.volume-ref: storage-data + com.github.rycus86.podlike.volume-ref: "{{ service }}-storage-data"