mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Implemented a new docker compose structure which seperates between docker compose files and environment variable file to protect credentials better. Also did recatoring. Changes not fully tested
This commit is contained in:
@@ -7,34 +7,9 @@ services:
|
||||
application:
|
||||
image: "nextcloud:{{applications.nextcloud.version}}-fpm-alpine"
|
||||
container_name: {{nextcloud_application_container_name}}
|
||||
restart: {{docker_restart_policy}}
|
||||
logging:
|
||||
driver: journald
|
||||
volumes:
|
||||
- data:/var/www/html
|
||||
environment:
|
||||
# See https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/config_sample_php_parameters.html
|
||||
|
||||
# Database Configuration
|
||||
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
|
||||
|
||||
# Email Configuration
|
||||
SMTP_HOST: {{system_email.host}}
|
||||
SMTP_SECURE: {{ 'ssl' if system_email.tls else '' }}
|
||||
SMTP_PORT: {{system_email.smtp_port}}
|
||||
SMTP_NAME: {{system_email.username}}
|
||||
SMTP_PASSWORD: {{system_email.password}}
|
||||
|
||||
# Email from configuration
|
||||
MAIL_FROM_ADDRESS: no-reply
|
||||
MAIL_DOMAIN: {{system_email.domain}}
|
||||
|
||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
||||
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
|
||||
{% include 'templates/docker/container/networks.yml.j2' %}
|
||||
|
||||
|
21
roles/docker-nextcloud/templates/env.j2
Normal file
21
roles/docker-nextcloud/templates/env.j2
Normal file
@@ -0,0 +1,21 @@
|
||||
# See https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/config_sample_php_parameters.html
|
||||
|
||||
# Database Configuration
|
||||
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
|
||||
|
||||
# Email Configuration
|
||||
SMTP_HOST= {{system_email.host}}
|
||||
SMTP_SECURE= {{ 'ssl' if system_email.tls else '' }}
|
||||
SMTP_PORT= {{system_email.smtp_port}}
|
||||
SMTP_NAME= {{system_email.username}}
|
||||
SMTP_PASSWORD= {{system_email.password}}
|
||||
|
||||
# Email from configuration
|
||||
MAIL_FROM_ADDRESS= no-reply
|
||||
MAIL_DOMAIN= {{system_email.domain}}
|
Reference in New Issue
Block a user