Made docker backup before docker update obligatoric

This commit is contained in:
Kevin Veen-Birkenbach 2023-12-14 00:22:35 +01:00
parent f1e1d2f21e
commit b9b1e2d4f8
2 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,5 @@
[Unit]
Description=docker volume backup
Description=backup docker volumes to local folder
OnFailure=systemd-notifier@%n.service cleanup-failed-docker-backups.service
[Service]

View File

@ -4,6 +4,7 @@ OnFailure=systemd-notifier@%n.service
[Service]
Type=oneshot
ExecStartPre=/bin/sh -c 'systemctl start backup-docker-to-local.service'
ExecStartPre=/bin/sh -c '/usr/bin/python {{ path_system_maintenance_service_freezer_script }} freeze "{{ system_maintenance_services | reject('equalto', "update-docker") | join(',') }}"'
ExecStart=/bin/sh -c '/usr/bin/python {{update_docker_script}} {{path_docker_compose_instances}}'
ExecStartPost=/bin/sh -c 'systemctl start system-maintenance-service-defrost.service'