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 --keep-monthly 12
{% if 'nextcloud' in apps_backup %} {% if 'nextcloud' in apps_backup %}
PRE_COMMANDS: |- 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: |- 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 %} {% endif %}
B2_ACCOUNT_ID: {{ restic.b2.id }} B2_ACCOUNT_ID: {{ restic.b2.id }}
B2_ACCOUNT_KEY: {{ restic.b2.key }} B2_ACCOUNT_KEY: {{ restic.b2.key }}
TZ: {{ timezone }} TZ: {{ timezone }}
volumes: volumes:
- "/var/run/docker.sock:/var/run/docker.sock:rw" - "/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 %} {% for app in apps_backup|sort %}
- "{{ apps_data_root }}/{{ app }}/data:/mnt/volumes/{{ app }}:ro" - "{{ apps_data_root }}/{{ app }}/data:/mnt/volumes/{{ app }}:ro"
{% endfor %} {% endfor %}