Fix Restic putting Nextcloud in maintenance mode

This commit is contained in:
Sam A. 2023-12-29 19:42:43 +01:00
parent 38de09c98d
commit 2a0fcd6012
Signed by: samsapti
GPG key ID: CBBBE7371E81C4EA

View file

@ -24,16 +24,15 @@ services:
--keep-monthly 12
{% if 'nextcloud' in apps_backup %}
PRE_COMMANDS: |-
docker compose -f {{ apps_data_root }}/nextcloud/docker-compose.yml exec -u www-data app php occ maintenance:mode --on
docker exec -u www-data nextcloud-app-1 php occ maintenance:mode --on
POST_COMMANDS_EXIT: |-
docker compose -f {{ apps_data_root }}/nextcloud/docker-compose.yml exec -u www-data app php occ maintenance:mode --off
docker exec -u www-data nextcloud-app-1 php occ maintenance:mode --off
{% endif %}
B2_ACCOUNT_ID: {{ restic.b2.id }}
B2_ACCOUNT_KEY: {{ restic.b2.key }}
TZ: {{ timezone }}
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:rw"
- "/usr/libexec/docker/cli-plugins/docker-compose:/usr/libexec/docker/cli-plugins/docker-compose:ro"
{% for app in apps_backup|sort %}
- "{{ apps_data_root }}/{{ app }}/data:/mnt/volumes/{{ app }}:ro"
{% endfor %}