bundles/paperless: fix config for static directory

This commit is contained in:
Franzi 2024-02-17 04:44:29 +01:00
parent 72f756a686
commit 26ee966bd6
Signed by: kunsi
GPG key ID: 12E3D2136B818350
6 changed files with 38 additions and 53 deletions

View file

@ -79,3 +79,36 @@ def icinga_check_for_new_release(metadata):
},
},
}
@metadata_reactor.provides(
'nginx/vhosts/paperless',
)
def nginx(metadata):
if not node.has_bundle('nginx'):
raise DoNotRunAgain
return {
'nginx': {
'vhosts': {
'paperless': {
'domain': metadata.get('paperless/domain'),
'locations': {
'/': {
'target': 'http://127.0.0.1:22070',
'websockets': True,
'proxy_set_header': {
'X-Forwarded-Host': '$server_name',
},
},
'/static/': {
'alias': '/opt/paperless/src/paperless-ngx/static/',
},
},
'max_body_size': '100M',
'website_check_path': '/accounts/login/',
'website_check_string': 'Paperless-ngx',
},
},
},
}