have more bundles provide nginx metadata for themselves

This commit is contained in:
Franzi 2021-07-16 14:20:01 +02:00
parent 2ca14d0f62
commit 6022bac0ef
Signed by: kunsi
GPG key ID: 12E3D2136B818350
6 changed files with 63 additions and 29 deletions

View file

@ -12,7 +12,7 @@ defaults = {
} }
@metadata_reactor.provides( @metadata_reactor.provides(
'nginx/vhosts', 'nginx/vhosts/element-web',
) )
def nginx_config(metadata): def nginx_config(metadata):
return { return {

View file

@ -66,7 +66,7 @@ defaults = {
@metadata_reactor.provides( @metadata_reactor.provides(
'nginx/vhosts', 'nginx/vhosts/gitea',
) )
def nginx(metadata): def nginx(metadata):
if not node.has_bundle('nginx'): if not node.has_bundle('nginx'):

View file

@ -32,3 +32,28 @@ defaults = {
}, },
}, },
} }
@metadata_reactor.provides(
'nginx/vhosts/jenkins-ci',
)
def nginx(metadata):
if not node.has_bundle('nginx'):
raise DoNotRunAgain
return {
'nginx': {
'vhosts': {
'jenkins-ci': {
'domain': metadata.get('jenkins-ci/domain'),
'locations': {
'/': {
'target': 'http://localhost:22010/',
},
},
'website_check_path': '/login',
'website_check_string': 'Welcome to Jenkins',
},
},
},
}

View file

@ -36,7 +36,7 @@ defaults = {
@metadata_reactor.provides( @metadata_reactor.provides(
'nginx/vhosts', 'nginx/vhosts/miniflux',
) )
def nginx(metadata): def nginx(metadata):
if not node.has_bundle('nginx'): if not node.has_bundle('nginx'):

View file

@ -23,3 +23,34 @@ defaults = {
}, },
}, },
} }
@metadata_reactor.provides(
'nginx/vhosts/travelynx',
)
def nginx(metadata):
if not node.has_bundle('nginx'):
raise DoNotRunAgain
return {
'nginx': {
'vhosts': {
'travelynx': {
'domain': metadata.get('travelynx/domain'),
'locations': {
'/': {
'target': 'http://127.0.0.1:22020',
},
'/static': {
'root': '/opt/travelynx/public',
},
'/service-worker.js': {
'root': '/opt/travelynx/public',
},
},
'website_check_path': '/login',
'website_check_string': 'travelynx',
},
},
},
}

View file

@ -115,6 +115,7 @@ nodes['rx300'] = {
}, },
'jenkins-ci': { 'jenkins-ci': {
'install_ssh_key': True, 'install_ssh_key': True,
'domain': 'jenkins.franzi.business',
}, },
'miniflux': { 'miniflux': {
'domain': 'rss.franzi.business', 'domain': 'rss.franzi.business',
@ -123,7 +124,9 @@ nodes['rx300'] = {
'vhosts': { 'vhosts': {
'element-web': {'ssl': '_.franzi.business'}, 'element-web': {'ssl': '_.franzi.business'},
'gitea': {'ssl': '_.franzi.business'}, 'gitea': {'ssl': '_.franzi.business'},
'jenkins-ci': {'ssl': '_.franzi.business'},
'miniflux': {'ssl': '_.franzi.business'}, 'miniflux': {'ssl': '_.franzi.business'},
'travelynx': {'ssl': '_.franzi.business'},
'franzi.business': { 'franzi.business': {
'webroot': '/var/www/franzi.business/_site/', 'webroot': '/var/www/franzi.business/_site/',
'ssl': '_.franzi.business', 'ssl': '_.franzi.business',
@ -156,17 +159,6 @@ nodes['rx300'] = {
}, },
}, },
}, },
'jenkins': {
'domain': 'jenkins.franzi.business',
'ssl': '_.franzi.business',
'locations': {
'/': {
'target': 'http://localhost:22010/',
},
},
'website_check_path': '/login',
'website_check_string': 'Welcome to Jenkins',
},
'unicornsden-redirect': { 'unicornsden-redirect': {
'domain': 'unicornsden.franzi.business', 'domain': 'unicornsden.franzi.business',
'ssl': '_.franzi.business', 'ssl': '_.franzi.business',
@ -185,21 +177,6 @@ nodes['rx300'] = {
'mode': '0755', 'mode': '0755',
}, },
}, },
'travelynx': {
'domain': 'travelynx.franzi.business',
'ssl': '_.franzi.business',
'locations': {
'/': {
'target': 'http://127.0.0.1:22020',
},
'/static': {
'root': '/opt/travelynx/public',
},
'/service-worker.js': {
'root': '/opt/travelynx/public',
},
},
},
'wiki.franzi.business': { 'wiki.franzi.business': {
'ssl': '_.franzi.business', 'ssl': '_.franzi.business',
'extras': True, 'extras': True,
@ -246,6 +223,7 @@ nodes['rx300'] = {
'travelynx': { 'travelynx': {
'version': '1.20.3', 'version': '1.20.3',
'mail_from': 'travelynx@franzi.business', 'mail_from': 'travelynx@franzi.business',
'domain': 'travelynx.franzi.business',
}, },
'users': { 'users': {
'kunsi': { 'kunsi': {