bundles/docker-immich: add album-auto-share script

This commit is contained in:
Franzi 2025-02-23 13:17:54 +01:00
parent 9edf9111a1
commit ff2be8d58d
Signed by: kunsi
GPG key ID: 12E3D2136B818350
4 changed files with 114 additions and 0 deletions

View file

@ -1,6 +1,11 @@
assert node.has_bundle('docker-engine')
defaults = {
'apt': {
'packages': {
'python3-psycopg2': {},
},
},
'docker-engine': {
'containers': {
'immich': {
@ -45,6 +50,9 @@ defaults = {
},
},
},
'docker-immich': {
'enable_auto_album_share': False,
},
'nginx': {
'vhosts': {
'immich': {
@ -59,3 +67,23 @@ defaults = {
},
},
}
@metadata_reactor.provides(
'systemd-timers/timers/immich-auto-album-share',
)
def auto_album_share(metadata):
if not metadata.get('docker-immich/enable_auto_album_share'):
return {}
return {
'systemd-timers': {
'timers': {
'immich-auto-album-share': {
'command': '/usr/local/bin/immich-auto-album-share.py',
'environment': metadata.get('docker-engine/containers/immich/environment'),
'when': 'minutely',
},
},
},
}