87 lines
2 KiB
Python
87 lines
2 KiB
Python
defaults = {
|
|
'backups': {
|
|
'paths': {
|
|
'/var/www/nextcloud',
|
|
},
|
|
},
|
|
'php': {
|
|
'clear_env': False,
|
|
'memory_limit': 512,
|
|
'packages': {
|
|
'bcmath',
|
|
'bz2',
|
|
'curl',
|
|
'gd',
|
|
'gmp',
|
|
'imagick',
|
|
'intl',
|
|
'mbstring',
|
|
'opcache',
|
|
'pgsql',
|
|
'redis',
|
|
'xml',
|
|
'yaml',
|
|
'zip',
|
|
},
|
|
},
|
|
'postgresql': {
|
|
'roles': {
|
|
'nextcloud': {
|
|
'password': repo.vault.password_for(f'{node.name} postgresql nextcloud'),
|
|
},
|
|
},
|
|
'databases': {
|
|
'nextcloud': {
|
|
'owner': 'nextcloud',
|
|
},
|
|
},
|
|
},
|
|
'systemd-timers': {
|
|
'timers': {
|
|
'nextcloud-cron': {
|
|
'command': '/usr/bin/php -f /var/www/nextcloud/cron.php',
|
|
'pwd': '/var/www/nextcloud',
|
|
'user': 'www-data',
|
|
'when': '*:00/5',
|
|
},
|
|
},
|
|
},
|
|
'zfs': {
|
|
'datasets': {
|
|
'tank/nextcloud': {
|
|
'mountpoint': '/var/www/nextcloud',
|
|
'needed_by': {
|
|
'directory:/var/www/nextcloud',
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}
|
|
|
|
|
|
@metadata_reactor.provides(
|
|
'nginx/vhosts/nextcloud',
|
|
)
|
|
def nginx(metadata):
|
|
if not node.has_bundle('nginx'):
|
|
raise DoNotRunAgain
|
|
|
|
return {
|
|
'nginx': {
|
|
'vhosts': {
|
|
'nextcloud': {
|
|
'domain': metadata.get('nextcloud/domain'),
|
|
'php': True,
|
|
'extras': True,
|
|
'index': [
|
|
'index.php',
|
|
'index.html',
|
|
'/index.php$request_uri',
|
|
],
|
|
'webroot_config': {
|
|
'owner': 'www-data',
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}
|