infobeamer-cms: initial commit
This commit is contained in:
parent
38b449af35
commit
bf125a73b1
4 changed files with 233 additions and 0 deletions
86
bundles/infobeamer-cms/metadata.py
Normal file
86
bundles/infobeamer-cms/metadata.py
Normal file
|
@ -0,0 +1,86 @@
|
|||
defaults = {
|
||||
'apt': {
|
||||
'packages': {
|
||||
'gunicorn': {},
|
||||
'python3-gevent': {},
|
||||
'python3-flask': {},
|
||||
'python3-redis': {},
|
||||
'python3-virtualenv': {},
|
||||
'python3-requests': {},
|
||||
'python3-iso8601': {},
|
||||
},
|
||||
},
|
||||
'infobeamer-cms': {
|
||||
'config': {
|
||||
'GITHUB_CLIENT_ID': 'encrypted1',
|
||||
'GITHUB_CLIENT_SECRET': 'encryted2',
|
||||
'SESSION_COOKIE_NAME': '__Host-sess',
|
||||
'PREFERRED_URL_SCHEME': 'https',
|
||||
'HOSTED_API_KEY': 'encrypted3',
|
||||
'MAX_UPLOADS': 5,
|
||||
'SETUP_IDS': '[123456]',
|
||||
'URL_KEY': 'encrypted4',
|
||||
'PUSHOVER_TARGET': 'encrypted5',
|
||||
'PUSHOVER_APP_KEY': 'encrypted6',
|
||||
'TIME_MIN': 1640039559,
|
||||
'TIME_MAX': 1640905200,
|
||||
'VERSION': 1,
|
||||
'ROOMS': [
|
||||
{
|
||||
'name': 'Ada',
|
||||
'device_id': 5919,
|
||||
'interrupts': [
|
||||
{
|
||||
'name': 'Signal',
|
||||
'data': 'signal',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
'name': 'Borg',
|
||||
'device_id': 5920,
|
||||
'interrupts': [
|
||||
{
|
||||
'name': 'Signal',
|
||||
'data': 'signal',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
'unused': 'foobar',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@metadata_reactor.provides(
|
||||
'nginx/vhosts',
|
||||
)
|
||||
def nginx(metadata):
|
||||
if not node.has_bundle('nginx'):
|
||||
raise DoNotRunAgain
|
||||
|
||||
locations = {
|
||||
'/': {
|
||||
'target': 'http://127.0.0.1:8000',
|
||||
},
|
||||
'/twitter/': {
|
||||
'alias': '/export/twitter/',
|
||||
},
|
||||
'/static/': {
|
||||
'alias': '/opt/infobeamer-cms/static',
|
||||
},
|
||||
}
|
||||
|
||||
vhosts = {
|
||||
'infobeamer-cms': {
|
||||
'locations': locations,
|
||||
'website_check_path': '/',
|
||||
'website_check_string': '',
|
||||
},
|
||||
}
|
||||
|
||||
return {
|
||||
'nginx': {
|
||||
'vhosts': vhosts
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue