2020-12-27 19:41:35 +01:00
|
|
|
version: '2.2'
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
|
|
|
# External dependencies
|
|
|
|
redis:
|
|
|
|
image: redis:alpine
|
|
|
|
restart: always
|
2021-10-11 22:40:26 +02:00
|
|
|
env_file: mailu.env
|
2020-12-27 19:41:35 +01:00
|
|
|
volumes:
|
2020-12-28 20:54:44 +01:00
|
|
|
- "redis_data:/data"
|
2022-01-21 18:09:56 +01:00
|
|
|
healthcheck:
|
|
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
|
|
interval: 1s
|
|
|
|
timeout: 3s
|
|
|
|
retries: 30
|
2022-01-29 19:21:46 +01:00
|
|
|
logging:
|
|
|
|
driver: journald
|
2020-12-28 17:24:45 +01:00
|
|
|
database:
|
|
|
|
image: mariadb
|
|
|
|
restart: always
|
|
|
|
environment:
|
|
|
|
MYSQL_DATABASE: "mailu"
|
|
|
|
MYSQL_USER: "mailu"
|
|
|
|
MYSQL_PASSWORD: "{{mailu_database_password}}"
|
|
|
|
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
|
|
|
|
volumes:
|
|
|
|
- database:/var/lib/mysql
|
2022-01-21 00:11:06 +01:00
|
|
|
healthcheck:
|
|
|
|
test: "/usr/bin/mysql --user=mailu --password={{mailu_database_password}} --execute \"SHOW DATABASES;\""
|
|
|
|
interval: 3s
|
|
|
|
timeout: 1s
|
|
|
|
retries: 5
|
2022-01-29 19:21:46 +01:00
|
|
|
logging:
|
|
|
|
driver: journald
|
|
|
|
|
2020-12-27 19:41:35 +01:00
|
|
|
# Core services
|
|
|
|
front:
|
2020-12-28 19:09:20 +01:00
|
|
|
image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}nginx:${MAILU_VERSION:-1.8}
|
2020-12-27 19:41:35 +01:00
|
|
|
restart: always
|
|
|
|
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"
|
|
|
|
- "{{ ip4_address }}:587:587"
|
|
|
|
- "{{ ip4_address }}:110:110"
|
|
|
|
- "{{ ip4_address }}:995:995"
|
|
|
|
- "{{ ip4_address }}:143:143"
|
|
|
|
- "{{ ip4_address }}:993:993"
|
|
|
|
volumes:
|
2020-12-28 21:24:32 +01:00
|
|
|
- "/etc/mailu/overrides/nginx:/overrides"
|
2021-04-05 12:32:55 +02:00
|
|
|
- "/etc/mailu/certs:/certs"
|
2022-01-21 00:11:06 +01:00
|
|
|
depends_on:
|
|
|
|
database:
|
|
|
|
condition: service_healthy
|
2020-12-27 19:41:35 +01:00
|
|
|
admin:
|
2020-12-28 19:09:20 +01:00
|
|
|
image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}admin:${MAILU_VERSION:-1.8}
|
2020-12-27 19:41:35 +01:00
|
|
|
restart: always
|
|
|
|
env_file: mailu.env
|
|
|
|
volumes:
|
2020-12-28 20:54:44 +01:00
|
|
|
- "admin_data:/data"
|
|
|
|
- "dkim:/dkim"
|
2020-12-27 19:41:35 +01:00
|
|
|
depends_on:
|
2020-12-28 20:32:48 +01:00
|
|
|
- front
|
2022-01-29 19:21:46 +01:00
|
|
|
logging:
|
|
|
|
driver: journald
|
2020-12-27 19:41:35 +01:00
|
|
|
imap:
|
2020-12-28 19:09:20 +01:00
|
|
|
image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}dovecot:${MAILU_VERSION:-1.8}
|
2020-12-27 19:41:35 +01:00
|
|
|
restart: always
|
|
|
|
env_file: mailu.env
|
|
|
|
volumes:
|
2020-12-28 20:54:44 +01:00
|
|
|
- "dovecot_mail:/mail"
|
2020-12-28 21:24:32 +01:00
|
|
|
- "/etc/mailu/overrides:/overrides"
|
2020-12-27 19:41:35 +01:00
|
|
|
depends_on:
|
|
|
|
- front
|
2022-01-29 19:21:46 +01:00
|
|
|
logging:
|
|
|
|
driver: journald
|
2021-08-22 20:42:03 +02:00
|
|
|
|
2020-12-27 19:41:35 +01:00
|
|
|
smtp:
|
2020-12-28 19:09:20 +01:00
|
|
|
image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}postfix:${MAILU_VERSION:-1.8}
|
2020-12-27 19:41:35 +01:00
|
|
|
restart: always
|
|
|
|
env_file: mailu.env
|
|
|
|
volumes:
|
2020-12-28 21:24:32 +01:00
|
|
|
- "/etc/mailu/overrides:/overrides"
|
2020-12-28 20:32:48 +01:00
|
|
|
- "smtp_queue:/queue"
|
2020-12-27 19:41:35 +01:00
|
|
|
depends_on:
|
|
|
|
- front
|
2022-01-29 19:21:46 +01:00
|
|
|
logging:
|
|
|
|
driver: journald
|
2020-12-27 19:41:35 +01:00
|
|
|
|
|
|
|
antispam:
|
2020-12-28 19:09:20 +01:00
|
|
|
image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}rspamd:${MAILU_VERSION:-1.8}
|
2020-12-27 19:41:35 +01:00
|
|
|
restart: always
|
|
|
|
env_file: mailu.env
|
|
|
|
volumes:
|
2020-12-28 20:54:44 +01:00
|
|
|
- "filter:/var/lib/rspamd"
|
|
|
|
- "dkim:/dkim"
|
2020-12-28 21:24:32 +01:00
|
|
|
- "/etc/mailu/overrides/rspamd:/etc/rspamd/override.d"
|
2020-12-27 19:41:35 +01:00
|
|
|
depends_on:
|
|
|
|
- front
|
2022-01-29 19:21:46 +01:00
|
|
|
logging:
|
|
|
|
driver: journald
|
2020-12-27 19:41:35 +01:00
|
|
|
|
|
|
|
# Optional services
|
|
|
|
antivirus:
|
2020-12-28 19:09:20 +01:00
|
|
|
image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}clamav:${MAILU_VERSION:-1.8}
|
2020-12-27 19:41:35 +01:00
|
|
|
restart: always
|
|
|
|
env_file: mailu.env
|
|
|
|
volumes:
|
2020-12-28 20:54:44 +01:00
|
|
|
- "filter:/data"
|
2022-01-29 19:21:46 +01:00
|
|
|
logging:
|
|
|
|
driver: journald
|
2020-12-27 19:41:35 +01:00
|
|
|
|
|
|
|
webdav:
|
2020-12-28 19:09:20 +01:00
|
|
|
image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}radicale:${MAILU_VERSION:-1.8}
|
2020-12-27 19:41:35 +01:00
|
|
|
restart: always
|
|
|
|
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
|
2020-12-27 19:41:35 +01:00
|
|
|
|
2021-01-05 13:38:38 +01:00
|
|
|
# Deactivated, because service leads to slowing down of webservices.
|
|
|
|
# Checkout the readme.md for more information
|
2022-01-29 20:32:06 +01:00
|
|
|
#fetchmail:
|
|
|
|
# image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}fetchmail:${MAILU_VERSION:-1.8}
|
|
|
|
# restart: always
|
|
|
|
# env_file: mailu.env
|
|
|
|
# logging:
|
|
|
|
# driver: journald
|
2020-12-27 19:41:35 +01:00
|
|
|
|
|
|
|
# Webmail
|
|
|
|
webmail:
|
2020-12-28 19:09:20 +01:00
|
|
|
image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}roundcube:${MAILU_VERSION:-1.8}
|
2020-12-27 19:41:35 +01:00
|
|
|
restart: always
|
|
|
|
env_file: mailu.env
|
|
|
|
volumes:
|
2020-12-28 20:54:44 +01:00
|
|
|
- "webmail_data:/data"
|
2020-12-27 19:41:35 +01:00
|
|
|
depends_on:
|
|
|
|
- imap
|
2022-01-29 19:21:46 +01:00
|
|
|
logging:
|
|
|
|
driver: journald
|
2020-12-28 17:24:45 +01:00
|
|
|
volumes:
|
|
|
|
database:
|
2020-12-28 20:32:48 +01:00
|
|
|
smtp_queue:
|
2020-12-28 20:54:44 +01:00
|
|
|
admin_data:
|
|
|
|
webdav_data:
|
|
|
|
webmail_data:
|
|
|
|
filter:
|
|
|
|
dkim:
|
|
|
|
dovecot_mail:
|
|
|
|
redis_data:
|
2020-12-27 19:41:35 +01:00
|
|
|
networks:
|
|
|
|
default:
|
|
|
|
driver: bridge
|
|
|
|
ipam:
|
|
|
|
driver: default
|
|
|
|
config:
|
2020-12-27 23:14:11 +01:00
|
|
|
- subnet: {{mailu_subnet}}
|