bundles/paperless: fix config for static directory
This commit is contained in:
parent
72f756a686
commit
26ee966bd6
6 changed files with 38 additions and 53 deletions
|
@ -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',
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue