2020-08-20 13:34:27 +00:00
|
|
|
defaults = {
|
|
|
|
'users': {
|
|
|
|
'git': {
|
2020-08-29 17:21:35 +00:00
|
|
|
'do_not_remove_authorized_keys_from_home': True,
|
2020-08-20 13:34:27 +00:00
|
|
|
'home-mode': '0755',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'gitea': {
|
|
|
|
'database': {
|
|
|
|
'username': 'gitea',
|
|
|
|
'password': repo.vault.password_for('{} postgresql gitea'.format(node.name)),
|
|
|
|
'database': 'gitea',
|
|
|
|
},
|
|
|
|
'app_name': 'Gitea',
|
|
|
|
'lfs_secret_key': repo.vault.password_for('{} gitea lfs_secret_key'.format(node.name)),
|
|
|
|
'security_secret_key': repo.vault.password_for('{} gitea security_secret_key'.format(node.name)),
|
|
|
|
'oauth_secret_key': repo.vault.password_for('{} gitea oauth_secret_key'.format(node.name)),
|
|
|
|
'internal_token': repo.vault.password_for('{} gitea internal_token'.format(node.name)),
|
|
|
|
},
|
|
|
|
'postgresql': {
|
|
|
|
'users': {
|
|
|
|
'gitea': {
|
|
|
|
'password': repo.vault.password_for('{} postgresql gitea'.format(node.name)),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'databases': {
|
|
|
|
'gitea': {
|
|
|
|
'owner': 'gitea',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
2020-08-20 13:49:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
@metadata_reactor
|
|
|
|
def nginx(metadata):
|
|
|
|
if not node.has_bundle('nginx'):
|
|
|
|
raise DoNotRunAgain
|
|
|
|
|
|
|
|
return {
|
|
|
|
'nginx': {
|
|
|
|
'vhosts': {
|
|
|
|
metadata.get('gitea/domain'): {
|
|
|
|
'proxy': {
|
2020-09-22 16:36:10 +00:00
|
|
|
'/': {
|
|
|
|
'target': 'http://127.0.0.1:22000',
|
|
|
|
},
|
2020-08-20 13:49:11 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|