2018-04-22 11:53:18 +02:00
|
|
|
{% set env='mailu.env' %}
|
|
|
|
# This file is auto-generated by the Mailu configuration wizard.
|
|
|
|
# Please read the documentation before attempting any change.
|
2018-10-18 16:23:25 +02:00
|
|
|
# Generated for {{ flavor }} flavor
|
2018-04-22 11:53:18 +02:00
|
|
|
|
2018-10-17 15:46:20 +02:00
|
|
|
version: '3.6'
|
2018-04-22 11:53:18 +02:00
|
|
|
|
|
|
|
services:
|
|
|
|
|
|
|
|
# External dependencies
|
|
|
|
redis:
|
|
|
|
image: redis:alpine
|
2018-10-22 14:13:18 +02:00
|
|
|
restart: always
|
2018-04-22 11:53:18 +02:00
|
|
|
volumes:
|
2018-10-16 10:09:42 +02:00
|
|
|
- "{{ root }}/redis:/data"
|
2018-04-22 11:53:18 +02:00
|
|
|
|
|
|
|
# Core services
|
|
|
|
front:
|
2018-10-25 15:35:08 +02:00
|
|
|
image: ${DOCKER_ORG:-mailu}/nginx:${MAILU_VERSION:-{{ version }}}
|
2018-10-22 14:13:18 +02:00
|
|
|
restart: always
|
2018-04-22 11:53:18 +02:00
|
|
|
env_file: {{ env }}
|
2018-10-22 14:13:18 +02:00
|
|
|
logging:
|
|
|
|
driver: {{ log_driver or 'json-file' }}
|
2018-04-22 11:53:18 +02:00
|
|
|
ports:
|
|
|
|
{% for port in (80, 443, 25, 465, 587, 110, 995, 143, 993) %}
|
|
|
|
{% if bind4 %}
|
2018-10-16 11:34:55 +02:00
|
|
|
- "{{ bind4 }}:{{ port }}:{{ port }}"
|
2018-04-22 11:53:18 +02:00
|
|
|
{% endif %}
|
|
|
|
{% if bind6 %}
|
2018-10-16 10:09:42 +02:00
|
|
|
- "{{ bind6 }}:{{ port }}:{{ port }}"
|
2018-04-22 11:53:18 +02:00
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
volumes:
|
2018-10-16 10:09:42 +02:00
|
|
|
- "{{ root }}/certs:/certs"
|
2018-12-07 15:29:33 +02:00
|
|
|
- "{{ root }}/overrides/nginx:/overrides"
|
|
|
|
|
2018-10-23 16:46:06 +02:00
|
|
|
{% if resolver_enabled %}
|
2018-10-23 14:42:19 +02:00
|
|
|
resolver:
|
2018-10-23 14:46:53 +02:00
|
|
|
image: mailu/unbound:{{ version }}
|
2018-10-23 15:39:22 +02:00
|
|
|
env_file: {{ env }}
|
2018-10-23 14:42:19 +02:00
|
|
|
restart: always
|
|
|
|
networks:
|
|
|
|
default:
|
|
|
|
ipv4_address: {{ dns }}
|
|
|
|
{% endif %}
|
2018-04-22 11:53:18 +02:00
|
|
|
|
|
|
|
admin:
|
2018-10-25 15:35:08 +02:00
|
|
|
image: ${DOCKER_ORG:-mailu}/admin:${MAILU_VERSION:-{{ version }}}
|
2018-10-22 14:13:18 +02:00
|
|
|
restart: always
|
2018-04-22 11:53:18 +02:00
|
|
|
env_file: {{ env }}
|
2018-10-16 17:03:59 +02:00
|
|
|
{% if not admin_enabled %}
|
2018-04-22 11:53:18 +02:00
|
|
|
ports:
|
|
|
|
- 127.0.0.1:8080:80
|
|
|
|
{% endif %}
|
|
|
|
volumes:
|
2018-10-16 10:09:42 +02:00
|
|
|
- "{{ root }}/data:/data"
|
|
|
|
- "{{ root }}/dkim:/dkim"
|
2018-04-22 11:53:18 +02:00
|
|
|
depends_on:
|
|
|
|
- redis
|
|
|
|
|
|
|
|
imap:
|
2018-10-25 15:35:08 +02:00
|
|
|
image: ${DOCKER_ORG:-mailu}/dovecot:${MAILU_VERSION:-{{ version }}}
|
2018-10-22 14:13:18 +02:00
|
|
|
restart: always
|
2018-04-22 11:53:18 +02:00
|
|
|
env_file: {{ env }}
|
|
|
|
volumes:
|
2018-10-16 10:09:42 +02:00
|
|
|
- "{{ root }}/mail:/mail"
|
|
|
|
- "{{ root }}/overrides:/overrides"
|
2018-04-22 11:53:18 +02:00
|
|
|
depends_on:
|
|
|
|
- front
|
|
|
|
|
|
|
|
smtp:
|
2018-10-25 15:35:08 +02:00
|
|
|
image: ${DOCKER_ORG:-mailu}/postfix:${MAILU_VERSION:-{{ version }}}
|
2018-10-22 14:13:18 +02:00
|
|
|
restart: always
|
2018-04-22 11:53:18 +02:00
|
|
|
env_file: {{ env }}
|
|
|
|
volumes:
|
2018-10-16 10:09:42 +02:00
|
|
|
- "{{ root }}/overrides:/overrides"
|
2018-04-22 11:53:18 +02:00
|
|
|
depends_on:
|
|
|
|
- front
|
2018-10-23 16:46:06 +02:00
|
|
|
{% if resolver_enabled %}
|
2018-10-23 14:42:19 +02:00
|
|
|
- resolver
|
|
|
|
dns:
|
|
|
|
- {{ dns }}
|
|
|
|
{% endif %}
|
2018-04-22 11:53:18 +02:00
|
|
|
|
|
|
|
antispam:
|
2018-10-25 15:35:08 +02:00
|
|
|
image: ${DOCKER_ORG:-mailu}/rspamd:${MAILU_VERSION:-{{ version }}}
|
2018-10-22 14:13:18 +02:00
|
|
|
restart: always
|
2018-04-22 11:53:18 +02:00
|
|
|
env_file: {{ env }}
|
|
|
|
volumes:
|
2018-10-16 10:09:42 +02:00
|
|
|
- "{{ root }}/filter:/var/lib/rspamd"
|
|
|
|
- "{{ root }}/dkim:/dkim"
|
|
|
|
- "{{ root }}/overrides/rspamd:/etc/rspamd/override.d"
|
2018-04-22 11:53:18 +02:00
|
|
|
depends_on:
|
|
|
|
- front
|
2018-10-23 14:42:19 +02:00
|
|
|
{% if resolver_enabled %}
|
|
|
|
- resolver
|
|
|
|
dns:
|
|
|
|
- {{ dns }}
|
|
|
|
{% endif %}
|
2018-04-22 11:53:18 +02:00
|
|
|
|
2018-10-25 16:37:22 +02:00
|
|
|
# Optional services
|
2018-10-16 15:12:42 +02:00
|
|
|
{% if antivirus_enabled %}
|
2018-04-22 11:53:18 +02:00
|
|
|
antivirus:
|
2018-10-25 15:35:08 +02:00
|
|
|
image: ${DOCKER_ORG:-mailu}/clamav:${MAILU_VERSION:-{{ version }}}
|
2018-10-22 14:13:18 +02:00
|
|
|
restart: always
|
2018-04-22 11:53:18 +02:00
|
|
|
env_file: {{ env }}
|
|
|
|
volumes:
|
2018-10-16 10:09:42 +02:00
|
|
|
- "{{ root }}/filter:/data"
|
2018-10-23 14:42:19 +02:00
|
|
|
{% if resolver_enabled %}
|
|
|
|
depends_on:
|
|
|
|
- resolver
|
|
|
|
dns:
|
|
|
|
- {{ dns }}
|
|
|
|
{% endif %}
|
2018-04-22 11:53:18 +02:00
|
|
|
{% endif %}
|
|
|
|
|
2018-10-16 15:12:42 +02:00
|
|
|
{% if webdav_enabled %}
|
2018-04-22 11:53:18 +02:00
|
|
|
webdav:
|
2018-10-25 15:35:08 +02:00
|
|
|
image: ${DOCKER_ORG:-mailu}/radicale:${MAILU_VERSION:-{{ version }}}
|
2018-10-22 14:13:18 +02:00
|
|
|
restart: always
|
2018-04-22 11:53:18 +02:00
|
|
|
env_file: {{ env }}
|
|
|
|
volumes:
|
2018-10-16 10:09:42 +02:00
|
|
|
- "{{ root }}/dav:/data"
|
2018-04-22 11:53:18 +02:00
|
|
|
{% endif %}
|
|
|
|
|
2018-10-16 17:03:59 +02:00
|
|
|
{% if fetchmail_enabled %}
|
2018-04-22 11:53:18 +02:00
|
|
|
fetchmail:
|
2018-10-25 15:35:08 +02:00
|
|
|
image: ${DOCKER_ORG:-mailu}/fetchmail:${MAILU_VERSION:-{{ version }}}
|
2018-10-22 14:13:18 +02:00
|
|
|
restart: always
|
2018-04-22 11:53:18 +02:00
|
|
|
env_file: {{ env }}
|
2018-10-23 14:42:19 +02:00
|
|
|
{% if resolver_enabled %}
|
|
|
|
depends_on:
|
|
|
|
- resolver
|
|
|
|
dns:
|
|
|
|
- {{ dns }}
|
|
|
|
{% endif %}
|
2018-04-22 11:53:18 +02:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
# Webmail
|
2018-10-17 14:11:55 +02:00
|
|
|
{% if webmail_type != 'none' %}
|
2018-04-22 11:53:18 +02:00
|
|
|
webmail:
|
2018-10-25 15:35:08 +02:00
|
|
|
image: ${DOCKER_ORG:-mailu}/{{ webmail_type }}:${MAILU_VERSION:-{{ version }}}
|
2018-10-22 14:13:18 +02:00
|
|
|
restart: always
|
2018-04-22 11:53:18 +02:00
|
|
|
env_file: {{ env }}
|
|
|
|
volumes:
|
2018-10-16 10:09:42 +02:00
|
|
|
- "{{ root }}/webmail:/data"
|
2018-04-22 11:53:18 +02:00
|
|
|
depends_on:
|
|
|
|
- imap
|
|
|
|
{% endif %}
|
2018-12-06 16:44:12 +02:00
|
|
|
|
2018-10-23 14:42:19 +02:00
|
|
|
networks:
|
|
|
|
default:
|
|
|
|
driver: bridge
|
|
|
|
ipam:
|
|
|
|
driver: default
|
|
|
|
config:
|
|
|
|
- subnet: {{ subnet }}
|