computer-playbook/roles/docker-mailu/templates/docker-compose.yml.j2

214 lines
5.1 KiB
Plaintext
Raw Normal View History

2020-12-27 19:41:35 +01:00
services:
2024-01-19 15:12:18 +01:00
{% include 'templates/docker/services/redis.yml.j2' %}
2024-01-19 15:12:18 +01:00
{% include 'templates/docker/services/' + database_type + '.yml.j2' %}
2022-01-29 19:21:46 +01:00
2020-12-27 19:41:35 +01:00
# Core services
resolver:
image: ghcr.io/mailu/unbound:{{mailu_version}}
env_file: mailu.env
restart: {{docker_restart_policy}}
2024-01-19 15:12:18 +01:00
{% include 'templates/docker/container/networks.yml.j2' %}
ipv4_address: 192.168.203.254
logging:
driver: journald
2020-12-27 19:41:35 +01:00
front:
image: ghcr.io/mailu/nginx:{{mailu_version}}
restart: {{docker_restart_policy}}
2020-12-27 19:41:35 +01:00
env_file: mailu.env
logging:
2022-01-29 19:21:46 +01:00
driver: journald
2020-12-27 19:41:35 +01:00
ports:
2020-12-27 23:14:11 +01:00
- "127.0.0.1:{{ http_port }}:80"
2020-12-27 19:41:35 +01:00
- "{{ ip4_address }}:25:25"
- "{{ ip4_address }}:465:465"
2023-12-19 16:03:19 +01:00
- "{{ ip4_address }}:{{system_email_smtp_port}}:{{system_email_smtp_port}}"
2020-12-27 19:41:35 +01:00
- "{{ ip4_address }}:110:110"
- "{{ ip4_address }}:995:995"
- "{{ ip4_address }}:143:143"
- "{{ ip4_address }}:993:993"
2024-12-17 12:08:42 +01:00
- "{{ ip4_address }}:4190:4190"
2020-12-27 19:41:35 +01:00
volumes:
2023-04-15 19:48:46 +02:00
- "/etc/mailu/overrides/nginx:/overrides:ro"
2021-04-05 12:32:55 +02:00
- "/etc/mailu/certs:/certs"
2024-01-19 15:12:18 +01:00
{% include 'templates/docker/container/depends-on-also-database.yml.j2' %}
resolver:
condition: service_started
2024-01-19 15:12:18 +01:00
{% include 'templates/docker/container/networks.yml.j2' %}
webmail:
radicale:
dns:
- 192.168.203.254
2020-12-27 19:41:35 +01:00
admin:
image: ghcr.io/mailu/admin:{{mailu_version}}
restart: {{docker_restart_policy}}
2020-12-27 19:41:35 +01:00
env_file: mailu.env
volumes:
2020-12-28 20:54:44 +01:00
- "admin_data:/data"
- "dkim:/dkim"
2024-01-19 15:12:18 +01:00
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
resolver:
2024-01-04 11:36:55 +01:00
condition: service_started
front:
2024-01-04 11:36:55 +01:00
condition: service_started
2022-01-29 19:21:46 +01:00
logging:
driver: journald
dns:
- 192.168.203.254
2024-01-19 15:12:18 +01:00
{% include 'templates/docker/container/networks.yml.j2' %}
2020-12-27 19:41:35 +01:00
imap:
image: ghcr.io/mailu/dovecot:{{mailu_version}}
restart: {{docker_restart_policy}}
2020-12-27 19:41:35 +01:00
env_file: mailu.env
volumes:
2020-12-28 20:54:44 +01:00
- "dovecot_mail:/mail"
2023-04-15 19:48:46 +02:00
- "/etc/mailu/overrides:/overrides:ro"
2020-12-27 19:41:35 +01:00
depends_on:
- front
- resolver
dns:
- 192.168.203.254
2022-01-29 19:21:46 +01:00
logging:
driver: journald
2024-01-19 15:12:18 +01:00
{% include 'templates/docker/container/networks.yml.j2' %}
2021-08-22 20:42:03 +02:00
2020-12-27 19:41:35 +01:00
smtp:
image: ghcr.io/mailu/postfix:{{mailu_version}}
restart: {{docker_restart_policy}}
2020-12-27 19:41:35 +01:00
env_file: mailu.env
volumes:
2023-04-15 19:48:46 +02:00
- "/etc/mailu/overrides:/overrides:ro"
- "smtp_queue:/queue"
2020-12-27 19:41:35 +01:00
depends_on:
- front
- resolver
dns:
- 192.168.203.254
2022-01-29 19:21:46 +01:00
logging:
driver: journald
2024-01-19 15:12:18 +01:00
{% include 'templates/docker/container/networks.yml.j2' %}
2020-12-27 19:41:35 +01:00
2023-04-15 19:48:46 +02:00
oletools:
image: ghcr.io/mailu/oletools:{{mailu_version}}
2023-04-15 19:48:46 +02:00
hostname: oletools
restart: {{docker_restart_policy}}
depends_on:
- resolver
dns:
- 192.168.203.254
2024-01-19 15:12:18 +01:00
{% include 'templates/docker/container/networks.yml.j2' %}
noinet:
2023-04-15 19:48:46 +02:00
2020-12-27 19:41:35 +01:00
antispam:
image: ghcr.io/mailu/rspamd:{{mailu_version}}
restart: {{docker_restart_policy}}
2020-12-27 19:41:35 +01:00
env_file: mailu.env
volumes:
2020-12-28 20:54:44 +01:00
- "filter:/var/lib/rspamd"
- "dkim:/dkim"
2023-04-15 19:48:46 +02:00
- "/etc/mailu/overrides/rspamd:/overrides:ro"
2020-12-27 19:41:35 +01:00
depends_on:
- front
2023-04-15 13:24:21 +02:00
- redis
- antivirus
- resolver
dns:
- 192.168.203.254
2022-01-29 19:21:46 +01:00
logging:
driver: journald
2024-01-19 15:12:18 +01:00
{% include 'templates/docker/container/networks.yml.j2' %}
noinet:
2020-12-27 19:41:35 +01:00
# Optional services
antivirus:
2024-12-17 15:18:27 +01:00
image: clamav/clamav-debian:latest
restart: {{docker_restart_policy}}
2020-12-27 19:41:35 +01:00
env_file: mailu.env
volumes:
2020-12-28 20:54:44 +01:00
- "filter:/data"
depends_on:
- resolver
dns:
- 192.168.203.254
2022-01-29 19:21:46 +01:00
logging:
driver: journald
2024-01-19 15:12:18 +01:00
{% include 'templates/docker/container/networks.yml.j2' %}
2020-12-27 19:41:35 +01:00
webdav:
image: ghcr.io/mailu/radicale:{{mailu_version}}
restart: {{docker_restart_policy}}
2020-12-27 19:41:35 +01:00
env_file: mailu.env
volumes:
2020-12-28 20:54:44 +01:00
- "webdav_data:/data"
2022-01-29 19:21:46 +01:00
logging:
driver: journald
depends_on:
- resolver
dns:
- 192.168.203.254
2024-01-19 15:12:18 +01:00
{% include 'templates/docker/container/networks.yml.j2' %}
2024-01-04 09:47:14 +01:00
radicale:
2020-12-27 19:41:35 +01:00
fetchmail:
image: ghcr.io/mailu/fetchmail:{{mailu_version}}
2023-04-15 19:48:46 +02:00
volumes:
- "admin_data:/data"
restart: {{docker_restart_policy}}
env_file: mailu.env
logging:
driver: journald
2023-04-15 19:48:46 +02:00
depends_on:
- admin
- smtp
- imap
- resolver
dns:
- 192.168.203.254
2024-01-19 15:12:18 +01:00
{% include 'templates/docker/container/networks.yml.j2' %}
2020-12-27 19:41:35 +01:00
webmail:
image: ghcr.io/mailu/webmail:{{mailu_version}}
restart: {{docker_restart_policy}}
2020-12-27 19:41:35 +01:00
env_file: mailu.env
volumes:
2020-12-28 20:54:44 +01:00
- "webmail_data:/data"
- "/etc/mailu/overrides:/overrides:ro"
2020-12-27 19:41:35 +01:00
depends_on:
- imap
2023-04-15 19:48:46 +02:00
- front
- resolver
2022-01-29 19:21:46 +01:00
logging:
driver: journald
dns:
- 192.168.203.254
2024-01-19 15:12:18 +01:00
{% include 'templates/docker/container/networks.yml.j2' %}
webmail:
2024-01-19 15:12:18 +01:00
{% include 'templates/docker/compose/volumes.yml.j2' %}
smtp_queue:
2020-12-28 20:54:44 +01:00
admin_data:
webdav_data:
webmail_data:
filter:
dkim:
dovecot_mail:
2023-12-26 16:40:19 +01:00
redis:
2024-01-19 15:12:18 +01:00
{% include 'templates/docker/compose/networks.yml.j2' %}
2020-12-27 19:41:35 +01:00
driver: bridge
ipam:
driver: default
config:
2020-12-27 23:14:11 +01:00
- subnet: {{mailu_subnet}}
radicale:
driver: bridge
webmail:
driver: bridge
noinet:
driver: bridge
internal: true