mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Optimized Nextcloud Configuration
This commit is contained in:
2
roles/docker-nextcloud/templates/config/README.md
Normal file
2
roles/docker-nextcloud/templates/config/README.md
Normal file
@@ -0,0 +1,2 @@
|
||||
This folder contains configuration files which will be loaded direct into the config.php
|
||||
If you don't use nested configuration, concider to use the vars/system.yml file instead, because it's a cleaner way to set the configuration.
|
@@ -1,4 +1,8 @@
|
||||
<?php
|
||||
# Implementing OICD configuration
|
||||
|
||||
{% if applications[application_id].oidc.flavor == "oidc_login" | bool %}
|
||||
|
||||
# Check out: https://github.com/pulsejet/nextcloud-oidc-login
|
||||
|
||||
return array (
|
||||
@@ -210,4 +214,7 @@ return array (
|
||||
// - 'plain'
|
||||
// The default value is empty, which won't apply the PKCE flow.
|
||||
'oidc_login_code_challenge_method' => '',
|
||||
);
|
||||
);
|
||||
{% else %}
|
||||
return [];
|
||||
{% endif %}
|
11
roles/docker-nextcloud/templates/config/redis.config.php.j2
Normal file
11
roles/docker-nextcloud/templates/config/redis.config.php.j2
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
# Implementing redis configuration
|
||||
return array (
|
||||
'memcache.locking' => '\\OC\\Memcache\\Redis',
|
||||
'redis' =>
|
||||
array (
|
||||
'host' => 'redis',
|
||||
'port' => 6379,
|
||||
)
|
||||
);
|
@@ -8,12 +8,12 @@ services:
|
||||
image: "nextcloud:{{applications.nextcloud.version}}-fpm-alpine"
|
||||
container_name: {{applications.nextcloud.container.application}}
|
||||
volumes:
|
||||
- data:{{nextcloud_docker_path}}
|
||||
- data:{{nextcloud_docker_work_directory}}
|
||||
{% if applications[application_id].oidc.flavor == "oidc_login" %}
|
||||
- {{nextcloud_host_oidc_login_path}}:{{nextcloud_docker_oidc_login_config_path}}:ro
|
||||
- {{nextcloud_host_config_additives_directory}}:{{nextcloud_docker_config_additives_directory}}:ro
|
||||
{% endif %}
|
||||
healthcheck:
|
||||
test: ["CMD", "su", "www-data", "-s", "/bin/sh", "-c", "php {{nextcloud_docker_path}}occ status"]
|
||||
test: ["CMD", "su", "www-data", "-s", "/bin/sh", "-c", "php {{nextcloud_docker_work_directory}}occ status"]
|
||||
interval: 1m
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
@@ -50,10 +50,10 @@ services:
|
||||
logging:
|
||||
driver: journald
|
||||
volumes:
|
||||
- data:{{nextcloud_docker_path}}
|
||||
- data:{{nextcloud_docker_work_directory}}
|
||||
entrypoint: /cron.sh
|
||||
healthcheck:
|
||||
test: ["CMD", "su", "www-data", "-s", "/bin/sh", "-c", "php {{nextcloud_docker_path}}occ status"]
|
||||
test: ["CMD", "su", "www-data", "-s", "/bin/sh", "-c", "php {{nextcloud_docker_work_directory}}occ status"]
|
||||
interval: 1m
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
@@ -2,20 +2,20 @@
|
||||
# @See https://github.com/nextcloud/docker/blob/master/README.md
|
||||
|
||||
# Database Configuration
|
||||
MYSQL_DATABASE= "{{database_name}}"
|
||||
MYSQL_USER= "{{database_username}}"
|
||||
MYSQL_PASSWORD= "{{database_password}}"
|
||||
MYSQL_HOST= "{{database_host}}:{{database_port}}"
|
||||
MYSQL_DATABASE= "{{database_name}}"
|
||||
MYSQL_USER= "{{database_username}}"
|
||||
MYSQL_PASSWORD= "{{database_password}}"
|
||||
MYSQL_HOST= "{{database_host}}:{{database_port}}"
|
||||
|
||||
# Memory
|
||||
PHP_MEMORY_LIMIT= 1G # Required for plugin duplicate finder
|
||||
PHP_MEMORY_LIMIT= 1G # Required for plugin duplicate finder
|
||||
|
||||
# Email Configuration
|
||||
SMTP_HOST= {{system_email.host}}
|
||||
SMTP_SECURE= {{ 'ssl' if system_email.tls else '' }}
|
||||
SMTP_PORT= {{system_email.port}}
|
||||
SMTP_NAME= {{system_email.username}}
|
||||
SMTP_PASSWORD= {{system_email.password}}
|
||||
SMTP_HOST= {{system_email.host}}
|
||||
SMTP_SECURE= {{ 'ssl' if system_email.tls else '' }}
|
||||
SMTP_PORT= {{system_email.port}}
|
||||
SMTP_NAME= {{system_email.username}}
|
||||
SMTP_PASSWORD= {{system_email.password}}
|
||||
|
||||
# Email from configuration
|
||||
MAIL_FROM_ADDRESS= "{{system_email.local}}"
|
||||
|
11
roles/docker-nextcloud/templates/include.php.j2
Normal file
11
roles/docker-nextcloud/templates/include.php.j2
Normal file
@@ -0,0 +1,11 @@
|
||||
{% raw %}
|
||||
// Include and merge all PHP config files from cymais
|
||||
|
||||
$CONFIG_EXTRA = [];
|
||||
|
||||
foreach (glob("{% endraw %}{{ nextcloud_docker_config_additives_directory }}{% raw %}*.php") as $file) {
|
||||
$CONFIG_EXTRA = array_merge($CONFIG_EXTRA, include $file);
|
||||
}
|
||||
|
||||
$CONFIG = array_merge($CONFIG, $CONFIG_EXTRA);
|
||||
{% endraw %}
|
Reference in New Issue
Block a user