bundles/radicale: add metadata reactor for nginx vhost
This commit is contained in:
parent
ca9e661b97
commit
ff90f8cbca
1 changed files with 35 additions and 0 deletions
|
@ -14,9 +14,44 @@ defaults = {
|
|||
'tank/radicale': {
|
||||
'mountpoint': '/var/lib/radicale',
|
||||
'needed_by': {
|
||||
'directory:/var/lib/radicale/collections',
|
||||
'pkg_apt:python3-radicale',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@metadata_reactor.provides(
|
||||
'nginx/vhosts/radicale',
|
||||
)
|
||||
def nginx(metadata):
|
||||
if not node.has_bundle('nginx'):
|
||||
raise DoNotRunAgain
|
||||
|
||||
return {
|
||||
'nginx': {
|
||||
'vhosts': {
|
||||
'radicale': {
|
||||
'domain': metadata.get('radicale/domain'),
|
||||
'locations': {
|
||||
'/': {
|
||||
'target': 'http://[::1]:22050',
|
||||
'auth': {
|
||||
'file': '/etc/radicale/htpasswd',
|
||||
},
|
||||
'proxy_set_header': {
|
||||
'X-Remote-User': '$remote_user',
|
||||
},
|
||||
},
|
||||
'/.web/': {
|
||||
'target': 'http://[::1]:22050',
|
||||
}
|
||||
},
|
||||
'website_check_path': '/.web/',
|
||||
'website_check_string': 'Radicale',
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue