mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 23:08:06 +02:00
Adapted roles to new architecture
This commit is contained in:
2
roles/web-app-mailu/Todo.md
Normal file
2
roles/web-app-mailu/Todo.md
Normal file
@@ -0,0 +1,2 @@
|
||||
# Todos
|
||||
- Implement hard restart into Backup for mailu
|
@@ -1,4 +1,3 @@
|
||||
version: "2024.06" # Docker Image Version
|
||||
oidc:
|
||||
email_by_username: true # If true, then the mail is set by the username. If wrong then the OIDC user email is used
|
||||
enable_user_creation: true # Users will be created if not existing
|
||||
@@ -30,4 +29,7 @@ docker:
|
||||
redis:
|
||||
enabled: true
|
||||
database:
|
||||
enabled: true
|
||||
enabled: true
|
||||
mailu:
|
||||
version: "2024.06" # Docker Image Version
|
||||
name: mailu
|
@@ -19,7 +19,7 @@
|
||||
mailu_compose_dir: "{{ docker_compose.directories.instance }}"
|
||||
mailu_domain: "{{ primary_domain }}"
|
||||
mailu_api_base_url: "http://127.0.0.1:8080/api/v1"
|
||||
mailu_global_api_token: "{{ applications.mailu.credentials.api_token }}"
|
||||
mailu_global_api_token: "{{ applications | get_app_conf(application_id, 'credentials.api_token') }}"
|
||||
mailu_action: >-
|
||||
{{
|
||||
(
|
||||
|
@@ -2,13 +2,15 @@
|
||||
|
||||
# Core services
|
||||
resolver:
|
||||
image: {{docker_source}}/unbound:{{applications.mailu.version}}
|
||||
image: {{docker_source}}/unbound:{{ mailu_version }}
|
||||
container_name: {{mailu_name}}_resolver
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
ipv4_address: {{networks.local.mailu.dns}}
|
||||
ipv4_address: {{networks.local['web-app-mailu'].dns}}
|
||||
|
||||
front:
|
||||
image: {{docker_source}}/nginx:{{applications.mailu.version}}
|
||||
container_name: {{mailu_name}}_front
|
||||
image: {{docker_source}}/nginx:{{ mailu_version }}
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
ports:
|
||||
- "127.0.0.1:{{ports.localhost.http[application_id]}}:80"
|
||||
@@ -30,10 +32,11 @@
|
||||
webmail:
|
||||
radicale:
|
||||
dns:
|
||||
- {{networks.local.mailu.dns}}
|
||||
- {{networks.local['web-app-mailu'].dns}}
|
||||
|
||||
admin:
|
||||
image: {{docker_source}}/admin:{{applications.mailu.version}}
|
||||
container_name: {{mailu_name}}_admin
|
||||
image: {{docker_source}}/admin:{{ mailu_version }}
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
volumes:
|
||||
- "admin_data:/data"
|
||||
@@ -44,11 +47,12 @@
|
||||
front:
|
||||
condition: service_started
|
||||
dns:
|
||||
- {{networks.local.mailu.dns}}
|
||||
- {{networks.local['web-app-mailu'].dns}}
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
|
||||
imap:
|
||||
image: {{docker_source}}/dovecot:{{applications.mailu.version}}
|
||||
container_name: {{mailu_name}}_imap
|
||||
image: {{docker_source}}/dovecot:{{ mailu_version }}
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
volumes:
|
||||
- "dovecot_mail:/mail"
|
||||
@@ -57,11 +61,12 @@
|
||||
- front
|
||||
- resolver
|
||||
dns:
|
||||
- {{networks.local.mailu.dns}}
|
||||
- {{networks.local['web-app-mailu'].dns}}
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
|
||||
smtp:
|
||||
image: {{docker_source}}/postfix:{{applications.mailu.version}}
|
||||
container_name: {{mailu_name}}_smtp
|
||||
image: {{docker_source}}/postfix:{{ mailu_version }}
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
volumes:
|
||||
- "{{docker_compose.directories.volumes}}overrides:/overrides:ro"
|
||||
@@ -70,22 +75,24 @@
|
||||
- front
|
||||
- resolver
|
||||
dns:
|
||||
- {{networks.local.mailu.dns}}
|
||||
- {{networks.local['web-app-mailu'].dns}}
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
|
||||
oletools:
|
||||
image: {{docker_source}}/oletools:{{applications.mailu.version}}
|
||||
container_name: {{mailu_name}}_oletools
|
||||
image: {{docker_source}}/oletools:{{ mailu_version }}
|
||||
hostname: oletools
|
||||
restart: {{docker_restart_policy}}
|
||||
depends_on:
|
||||
- resolver
|
||||
dns:
|
||||
- {{networks.local.mailu.dns}}
|
||||
- {{networks.local['web-app-mailu'].dns}}
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
noinet:
|
||||
|
||||
antispam:
|
||||
image: {{docker_source}}/rspamd:{{applications.mailu.version}}
|
||||
container_name: {{mailu_name}}_antispam
|
||||
image: {{docker_source}}/rspamd:{{ mailu_version }}
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
volumes:
|
||||
- "filter:/var/lib/rspamd"
|
||||
@@ -97,13 +104,14 @@
|
||||
- antivirus
|
||||
- resolver
|
||||
dns:
|
||||
- {{networks.local.mailu.dns}}
|
||||
- {{networks.local['web-app-mailu'].dns}}
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
noinet:
|
||||
|
||||
|
||||
# Optional services
|
||||
antivirus:
|
||||
container_name: {{mailu_name}}_antivirus
|
||||
image: clamav/clamav-debian:latest
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
volumes:
|
||||
@@ -111,23 +119,25 @@
|
||||
depends_on:
|
||||
- resolver
|
||||
dns:
|
||||
- {{networks.local.mailu.dns}}
|
||||
- {{networks.local['web-app-mailu'].dns}}
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
|
||||
webdav:
|
||||
image: {{docker_source}}/radicale:{{applications.mailu.version}}
|
||||
container_name: {{mailu_name}}_webdav
|
||||
image: {{docker_source}}/radicale:{{ mailu_version }}
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
volumes:
|
||||
- "webdav_data:/data"
|
||||
depends_on:
|
||||
- resolver
|
||||
dns:
|
||||
- {{networks.local.mailu.dns}}
|
||||
- {{networks.local['web-app-mailu'].dns}}
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
radicale:
|
||||
|
||||
fetchmail:
|
||||
image: {{docker_source}}/fetchmail:{{applications.mailu.version}}
|
||||
container_name: {{mailu_name}}_fetchmail
|
||||
image: {{docker_source}}/fetchmail:{{ mailu_version }}
|
||||
volumes:
|
||||
- "admin_data:/data"
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
@@ -137,11 +147,12 @@
|
||||
- imap
|
||||
- resolver
|
||||
dns:
|
||||
- {{networks.local.mailu.dns}}
|
||||
- {{networks.local['web-app-mailu'].dns}}
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
|
||||
webmail:
|
||||
image: {{docker_source}}/webmail:{{applications.mailu.version}}
|
||||
container_name: {{mailu_name}}_webmail
|
||||
image: {{docker_source}}/webmail:{{ mailu_version }}
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
volumes:
|
||||
- "webmail_data:/data"
|
||||
@@ -151,19 +162,27 @@
|
||||
- front
|
||||
- resolver
|
||||
dns:
|
||||
- {{networks.local.mailu.dns}}
|
||||
- {{networks.local['web-app-mailu'].dns}}
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
webmail:
|
||||
|
||||
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||
smtp_queue:
|
||||
name: {{ mailu_smtp_queue }}
|
||||
admin_data:
|
||||
name: {{ mailu_admin_data }}
|
||||
webdav_data:
|
||||
name: {{ mailu_webdav_data }}
|
||||
webmail_data:
|
||||
name: {{ mailu_webmail_data }}
|
||||
filter:
|
||||
name: {{ mailu_filter }}
|
||||
dkim:
|
||||
name: {{ mailu_dkim }}
|
||||
dovecot_mail:
|
||||
name: {{ mailu_dovecot_mail }}
|
||||
redis:
|
||||
name: {{ mailu_redis }}
|
||||
|
||||
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
||||
radicale:
|
||||
|
@@ -11,13 +11,13 @@
|
||||
LD_PRELOAD=/usr/lib/libhardened_malloc.so
|
||||
|
||||
# Set to a randomly generated 16 bytes string
|
||||
SECRET_KEY={{applications.mailu.credentials.secret_key}}
|
||||
SECRET_KEY={{applications | get_app_conf(application_id,'credentials.secret_key')}}
|
||||
|
||||
# Subnet of the docker network. This should not conflict with any networks to which your system is connected. (Internal and external!)
|
||||
SUBNET={{networks.local.mailu.subnet}}
|
||||
SUBNET={{networks.local['web-app-mailu'].subnet}}
|
||||
|
||||
# Main mail domain
|
||||
DOMAIN={{applications.mailu.domain}}
|
||||
DOMAIN={{ applications | get_app_conf(application_id,'domain') }}
|
||||
|
||||
# Hostnames for this server, separated with comas
|
||||
HOSTNAMES={{domains | get_domain(application_id)}}
|
||||
@@ -151,7 +151,7 @@ SQLALCHEMY_DATABASE_URI=mysql+mysqlconnector://{{database_username}}:{{database_
|
||||
API=true
|
||||
WEB_API=/api
|
||||
# Configures the authentication token. The minimum length is 3 characters. This token must be passed as request header to the API as authentication token. This is a mandatory setting for using the RESTful API.
|
||||
API_TOKEN={{applications.mailu.credentials.api_token}}
|
||||
API_TOKEN={{ applications | get_app_conf(application_id, 'credentials.api_token')}}
|
||||
|
||||
|
||||
# Activated https://mailu.io/master/configuration.html#advanced-settings
|
||||
|
@@ -1,7 +1,7 @@
|
||||
application_id: "mailu"
|
||||
application_id: "web-app-mailu"
|
||||
|
||||
# Database Configuration
|
||||
database_password: "{{applications.mailu.credentials.database_password}}"
|
||||
database_password: "{{ applications | get_app_conf(application_id, ' credentials.database_password') }}"
|
||||
database_type: "mariadb"
|
||||
|
||||
cert_mount_directory: "{{docker_compose.directories.volumes}}certs/"
|
||||
@@ -12,4 +12,14 @@ docker_source: "{{ 'ghcr.io/heviat' if applications | get_app_conf(a
|
||||
|
||||
domain: "{{ domains | get_domain(application_id) }}"
|
||||
http_port: "{{ ports.localhost.http[application_id] }}"
|
||||
proxy_extra_configuration: "client_max_body_size 31M;"
|
||||
proxy_extra_configuration: "client_max_body_size 31M;"
|
||||
mailu_version: "{{ applications | get_app_conf(application_id, 'docker.services.mailu.version', True) }}"
|
||||
mailu_name: "{{ applications | get_app_conf(application_id, 'docker.services.mailu.name', True) }}"
|
||||
mailu_smtp_queue: "mailu_smtp_queue"
|
||||
mailu_admin_data: "mailu_admin_data"
|
||||
mailu_webdav_data: "mailu_webdav_data"
|
||||
mailu_webmail_data: "mailu_webmail_data"
|
||||
mailu_filter: "mailu_filter"
|
||||
mailu_dkim: "mailu_dkim"
|
||||
mailu_dovecot_mail: "mailu_dovecot_mail"
|
||||
mailu_redis: "mailu_redis"
|
||||
|
Reference in New Issue
Block a user