diff --git a/bundles/docker-immich/metadata.py b/bundles/docker-immich/metadata.py index 288b7f1..3952922 100644 --- a/bundles/docker-immich/metadata.py +++ b/bundles/docker-immich/metadata.py @@ -83,6 +83,9 @@ def auto_album_share(metadata): 'command': '/usr/local/bin/immich-auto-album-share.py', 'environment': metadata.get('docker-engine/containers/immich/environment'), 'when': 'minutely', + 'requisite': { + 'docker-immich-postgresql.service', + }, }, }, }, diff --git a/bundles/systemd-timers/files/template.service b/bundles/systemd-timers/files/template.service index 09c3080..271b756 100644 --- a/bundles/systemd-timers/files/template.service +++ b/bundles/systemd-timers/files/template.service @@ -7,8 +7,11 @@ [Unit] Description=Service for Timer ${timer} After=network.target -% if config.get('requires', ''): -Requires=${config['requires']} +% if config.get('requires', set()): +Requires=${' '.join(sorted(config['requires']))} +% endif +% if config.get('requisite', set()): +Requisite=${' '.join(sorted(config['requisite']))} % endif [Service]