2021-02-20 15:53:35 +00:00
|
|
|
defaults = {
|
|
|
|
'apt': {
|
|
|
|
'packages': {
|
|
|
|
'imagemagick': {},
|
|
|
|
'ffmpeg': {},
|
|
|
|
'libimage-exiftool-perl': {},
|
|
|
|
},
|
|
|
|
},
|
2021-02-20 19:02:26 +00:00
|
|
|
'backups': {
|
|
|
|
'paths': {
|
|
|
|
'/var/pleroma',
|
|
|
|
},
|
|
|
|
},
|
2021-02-20 15:53:35 +00:00
|
|
|
'zfs': {
|
|
|
|
'datasets': {
|
|
|
|
'tank/pleroma-data': {
|
|
|
|
'mountpoint': '/var/pleroma',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'postgresql': {
|
|
|
|
'roles': {
|
|
|
|
'pleroma': {
|
|
|
|
'password': repo.vault.password_for(f'{node.name} postgresql pleroma'),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'databases': {
|
|
|
|
'pleroma': {
|
|
|
|
'owner': 'pleroma',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
2021-02-20 18:37:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
@metadata_reactor.provides(
|
|
|
|
'nginx/vhosts/pleroma',
|
|
|
|
)
|
|
|
|
def nginx(metadata):
|
|
|
|
if not node.has_bundle('nginx'):
|
|
|
|
raise DoNotRunAgain
|
|
|
|
|
|
|
|
return {
|
|
|
|
'nginx': {
|
|
|
|
'vhosts': {
|
|
|
|
'pleroma': {
|
|
|
|
'domain': metadata.get('pleroma/url'),
|
|
|
|
'proxy': {
|
|
|
|
'/': {
|
|
|
|
'target': 'http://127.0.0.1:21000',
|
|
|
|
'websockets': True,
|
|
|
|
},
|
|
|
|
},
|
2021-02-20 21:11:19 +00:00
|
|
|
'website_check_path': '/main/all',
|
|
|
|
'website_check_string': 'use Pleroma',
|
2021-02-20 18:37:33 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|