This commit is contained in:
cronekorkn 2023-03-17 13:01:02 +01:00
parent c227c38875
commit 2e7bde59b4
Signed by: cronekorkn
SSH key fingerprint: SHA256:v0410ZKfuO1QHdgKBsdQNF64xmTxOF8osF1LIqwTcVw
5 changed files with 61 additions and 0 deletions

2
bundles/blog/README.md Normal file
View file

@ -0,0 +1,2 @@
JSON=$(cat bundles/build-server/example.json)
curl -X POST 'https://build.sublimity.de/crystal?file=procio.cr' -H "Content-Type: application/json" --data-binary @- <<< $JSON

8
bundles/blog/items.py Normal file
View file

@ -0,0 +1,8 @@
directories = {}
files = {
# '/etc/build-server.json': {
# 'owner': 'build-server',
# 'content': json.dumps(node.metadata.get('build-server'), indent=4, sort_keys=True, cls=MetadataJSONEncoder)
# },
}

38
bundles/blog/metadata.py Normal file
View file

@ -0,0 +1,38 @@
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',
},
},
},
}

View file

@ -37,6 +37,18 @@
'zfs',
],
'metadata': {
'dns': {
'wiegand.tel': {
'A': {'202.61.255.108'},
},
},
'id': 'af96709e-b13f-4965-a588-ef2cd476437a',
'network': {
'internal': {

View file

@ -19,6 +19,7 @@
'steam',
'wireguard',
'zfs',
'blog',
],
'metadata': {
'id': 'ea29bdf0-0b47-4bf4-8346-67d60c9dc4ae',