bundlewrap/bundles/blog/metadata.py
2023-03-22 21:08:45 +01:00

38 lines
859 B
Python

from ipaddress import ip_interface
defaults = {
'flask': {
'blog' : {
'git_url': "https://git.sublimity.de/cronekorkn/blog.git",
'port': 5000,
'app_module': 'ckn_blog',
'env': {
'CONFIG': '/etc/ckn-blog.json',
},
},
},
'users': {
'blog': {
'home': '/opt/blog',
},
},
}
@metadata_reactor.provides(
'nginx/vhosts',
)
def nginx(metadata):
return {
'nginx': {
'vhosts': {
metadata.get('build-server/hostname'): {
'content': 'nginx/proxy_pass.conf',
'context': {
'target': 'http://127.0.0.1:4000',
},
'check_path': '/status',
},
},
},
}