wipe: Add persistent storage

This commit is contained in:
Kacper Donat 2022-10-24 22:54:48 +02:00
parent de6cb040d5
commit 51d1b692f2

View File

@ -26,10 +26,12 @@ services:
image: registry.kadet.net/wipe/php-fpm:{{ wipe_version }}
volumes:
- www-data:/var/www
- 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
pod.copy.fpm: /var/conf/wipe/.env:/var/www/.env
pod.init.components: |
@ -38,6 +40,11 @@ services:
command: ["cp -r /var/www/* /mnt/www"]
volumes:
- 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
- image: registry.kadet.net/wipe/php-fpm:{{ wipe_version }}
entrypoint: ["/bin/sh", "-c"]
command: ["cp -r /var/www/nginx/* /mnt/config"]
@ -50,6 +57,7 @@ services:
- /var/run/docker.sock:/var/run/docker.sock:ro
- nginx-config:/mnt/nginx-config
- www-data:/mnt/www-data
- storage-data:/mnt/storage-data
configs:
dotenv_{{ dotenv_file.checksum }}:
@ -64,3 +72,7 @@ volumes:
name: {{'www-data.{{.Task.ID}}'}}
labels:
com.github.rycus86.podlike.volume-ref: www-data
storage-data:
name: {{'www-data.{{.Task.ID}}'}}
labels:
com.github.rycus86.podlike.volume-ref: storage-data