This commit is contained in:
mwiegand 2021-11-17 18:05:57 +01:00
parent c92704390d
commit 0bc88a6000
2 changed files with 31 additions and 11 deletions

View file

@ -12,6 +12,12 @@ files = {
'owner': 'build-server',
'content': json.dumps(node.metadata.get('build-server'), indent=4, cls=MetadataJSONEncoder)
},
'/opt/build-server/build-server-crystal': {
'content_type': 'download',
'source': 'https://dl.sublimity.de/build-server-crystal/build-server-crystal-amd64-latest',
'owner': 'build-server',
'mode': '500',
},
'/opt/build-server/strategies/crystal': {
'content_type': 'mako',
'owner': 'build-server',
@ -22,3 +28,11 @@ files = {
},
},
}
svc_systemd = {
'build-server': {
'needs': {
'file:/etc/systemd/system/build-server.service',
},
},
}

View file

@ -1,17 +1,23 @@
from ipaddress import ip_interface
defaults = {
'flask': {
'build-server' : {
'git_url': "https://git.sublimity.de/cronekorkn/build-server.git",
'port': 4000,
'app_module': 'build_server',
'user': 'build-server',
'group': 'build-server',
'timeout': 900,
'env': {
'CONFIG': '/etc/build-server.json',
'STRATEGIES_DIR': '/opt/build-server/strategies',
'systemd': {
'units': {
'build-server.service': {
'Unit': {
'Description': 'build server',
'After': 'network.target',
},
'Service': {
'User': 'build-server',
'Group': 'build-server',
'Environment': 'STRATEGIES_DIR=/opt/build-server/strategies',
'ExecStart': '/opt/build-server/build-server-crystal --port 4000',
'Restart': 'always',
},
'Install': {
'WantedBy': {'multi-user.target'},
},
},
},
},