home.paperless: update debian bookworm, update to paperless-ngx

This commit is contained in:
Franzi 2023-11-12 11:28:40 +01:00
parent b454fe4745
commit 400b10789a
Signed by: kunsi
GPG key ID: 12E3D2136B818350
3 changed files with 24 additions and 5 deletions

View file

@ -13,7 +13,7 @@ directories = {
git_deploy = { git_deploy = {
'/opt/paperless/src': { '/opt/paperless/src': {
'repo': 'https://github.com/jonaswinkler/paperless-ng.git', 'repo': 'https://github.com/paperless-ngx/paperless-ngx.git',
'rev': node.metadata.get('paperless/version'), 'rev': node.metadata.get('paperless/version'),
'triggers': { 'triggers': {
'action:paperless_collectstatic', 'action:paperless_collectstatic',
@ -100,7 +100,7 @@ actions = {
'command': 'command':
'cd /opt/paperless/src/src-ui && ' 'cd /opt/paperless/src/src-ui && '
'npm install && ' 'npm install && '
'node_modules/.bin/ng build --prod', 'node_modules/.bin/ng build',
'triggered': True, 'triggered': True,
'needs': { 'needs': {
'file:/opt/paperless/src/paperless.conf', 'file:/opt/paperless/src/paperless.conf',
@ -115,7 +115,7 @@ actions = {
'needs': { 'needs': {
'directory:/opt/paperless/static', 'directory:/opt/paperless/static',
'file:/opt/paperless/src/paperless.conf', 'file:/opt/paperless/src/paperless.conf',
'action:paperless_create_virtualenv', 'action:paperless_install_deps',
}, },
}, },
} }

View file

@ -56,3 +56,22 @@ def paperless_tesseract_languages(metadata):
'packages': packages, 'packages': packages,
}, },
} }
@metadata_reactor.provides(
'icinga2_api/paperless/services',
)
def icinga_check_for_new_release(metadata):
return {
'icinga2_api': {
'paperless': {
'services': {
'PAPERLESS UPDATE': {
'command_on_monitored_host': '/usr/local/share/icinga/plugins/check_github_for_new_release paperless-ngx/paperless-ngx {}'.format(metadata.get('paperless/version')),
'vars.notification.mail': True,
'check_interval': '60m',
},
},
},
},
}

View file

@ -8,7 +8,7 @@ nodes['home.paperless'] = {
'paperless-ng', 'paperless-ng',
}, },
'groups': { 'groups': {
'debian-buster', 'debian-bookworm',
'webserver', 'webserver',
}, },
'metadata': { 'metadata': {
@ -55,7 +55,7 @@ nodes['home.paperless'] = {
}, },
}, },
'paperless': { 'paperless': {
'version': 'ng-1.4.4', 'version': 'v1.17.4',
'timezone': 'Europe/Berlin', 'timezone': 'Europe/Berlin',
}, },
'postgresql': { 'postgresql': {