You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mailu/setup/flavors/compose/docker-compose.yml

120 lines
2.5 KiB
YAML

{% set env='mailu.env' %}
# This file is auto-generated by the Mailu configuration wizard.
# Please read the documentation before attempting any change.
# Generated for {{ flavor }} flavor
version: '3.6'
services:
# External dependencies
redis:
image: redis:alpine
restart: always
volumes:
- "{{ root }}/redis:/data"
# Core services
front:
image: mailu/nginx:{{ version }}
restart: always
env_file: {{ env }}
environment:
- TLS_FLAVOR={{ tls_flavor }}
- ADMIN={{ admin_enabled or 'false' }}
ports:
{% for port in (80, 443, 25, 465, 587, 110, 995, 143, 993) %}
{% if bind4 %}
- "{{ bind4 }}:{{ port }}:{{ port }}"
{% endif %}
{% if bind6 %}
- "{{ bind6 }}:{{ port }}:{{ port }}"
{% endif %}
{% endfor %}
volumes:
- "{{ root }}/certs:/certs"
admin:
image: mailu/admin:{{ version }}
restart: always
env_file: {{ env }}
{% if not admin_enabled %}
ports:
- 127.0.0.1:8080:80
{% endif %}
volumes:
- "{{ root }}/data:/data"
- "{{ root }}/dkim:/dkim"
depends_on:
- redis
imap:
image: mailu/dovecot:{{ version }}
restart: always
env_file: {{ env }}
volumes:
- "{{ root }}/mail:/mail"
- "{{ root }}/overrides:/overrides"
depends_on:
- front
smtp:
image: mailu/postfix:{{ version }}
restart: always
env_file: {{ env }}
volumes:
- "{{ root }}/overrides:/overrides"
depends_on:
- front
# Optional services
{% if antispam_enabled %}
antispam:
image: mailu/rspamd:{{ version }}
restart: always
env_file: {{ env }}
volumes:
- "{{ root }}/filter:/var/lib/rspamd"
- "{{ root }}/dkim:/dkim"
- "{{ root }}/overrides/rspamd:/etc/rspamd/override.d"
depends_on:
- front
{% endif %}
{% if antivirus_enabled %}
antivirus:
image: mailu/clamav:{{ version }}
restart: always
env_file: {{ env }}
volumes:
- "{{ root }}/filter:/data"
{% endif %}
{% if webdav_enabled %}
webdav:
image: mailu/radicale:{{ version }}
restart: always
env_file: {{ env }}
volumes:
- "{{ root }}/dav:/data"
{% endif %}
{% if fetchmail_enabled %}
fetchmail:
image: mailu/fetchmail:{{ version }}
restart: always
env_file: {{ env }}
{% endif %}
# Webmail
{% if webmail_type != 'none' %}
webmail:
image: mailu/{{ webmail_type }}:{{ version }}
restart: always
env_file: {{ env }}
volumes:
- "{{ root }}/webmail:/data"
depends_on:
- imap
{% endif %}