bundles/docker-immich: add album-auto-share script
This commit is contained in:
parent
9edf9111a1
commit
ff2be8d58d
4 changed files with 114 additions and 0 deletions
|
@ -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',
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue