2020-08-19 16:43:32 +00:00
|
|
|
defaults = {
|
|
|
|
'travelynx': {
|
|
|
|
'database': {
|
|
|
|
'username': 'travelynx',
|
|
|
|
'password': repo.vault.password_for('{} postgresql travelynx'.format(node.name)),
|
|
|
|
'database': 'travelynx',
|
|
|
|
},
|
|
|
|
'workers': 4,
|
|
|
|
'spare_workers': 2,
|
|
|
|
'mail_from': 'travelynx@{}'.format(node.hostname),
|
|
|
|
'cookie_secret': repo.vault.password_for('{} travelynx cookie_secret'.format(node.name)),
|
|
|
|
},
|
|
|
|
'postgresql': {
|
2020-11-10 11:37:58 +00:00
|
|
|
'roles': {
|
2020-08-19 16:43:32 +00:00
|
|
|
'travelynx': {
|
|
|
|
'password': repo.vault.password_for('{} postgresql travelynx'.format(node.name)),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'databases': {
|
|
|
|
'travelynx': {
|
|
|
|
'owner': 'travelynx',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
2021-07-16 12:20:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
@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',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|