add nginx proxy to jellyfin
This commit is contained in:
parent
361bb6a563
commit
4084e764e4
3 changed files with 36 additions and 5 deletions
|
@ -13,6 +13,11 @@ defaults = {
|
|||
},
|
||||
},
|
||||
},
|
||||
'backups': {
|
||||
'paths': {
|
||||
f'/var/lib/jellyfin/{x}' for x in ('data', 'metadata', 'plugins', 'root')
|
||||
},
|
||||
},
|
||||
'icinga2_api': {
|
||||
'transmission': {
|
||||
'services': {
|
||||
|
@ -26,13 +31,27 @@ defaults = {
|
|||
|
||||
|
||||
@metadata_reactor.provides(
|
||||
'firewall/port_rules',
|
||||
'nginx/vhosts/jellyfin',
|
||||
)
|
||||
def firewall(metadata):
|
||||
def nginx(metadata):
|
||||
if not node.has_bundle('nginx'):
|
||||
raise DoNotRunAgain
|
||||
|
||||
if 'jellyfin' not in metadata.get('nginx/vhosts', {}):
|
||||
return {}
|
||||
|
||||
return {
|
||||
'firewall': {
|
||||
'port_rules': {
|
||||
'8096': atomic(metadata.get('jellyfin/restrict-to', {'*'})),
|
||||
'nginx': {
|
||||
'vhosts': {
|
||||
'jellyfin': {
|
||||
'do_not_add_content_security_headers': True,
|
||||
'locations': {
|
||||
'/': {
|
||||
'target': 'http://127.0.0.1:8096',
|
||||
'websockets': True,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue