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

128 lines
2.9 KiB
Django/Jinja

# This file is auto-generated by the Mailu configuration wizard.
# Please read the documentation before attempting any change.
# Generated for compose flavor
version: '2.2'
services:
# External dependencies
redis:
image: redis:alpine
restart: always
volumes:
- "redis-data:/data"
# Core services
front:
image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}nginx:${MAILU_VERSION:-1.7}
restart: always
env_file: mailu.env
logging:
driver: json-file
ports:
- "{{ http_port }}:80"
- "{{ https_port }}:443"
- "{{ 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:
- "nginx-certs:/certs"
- "nginx-overrides:/overrides"
admin:
image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}admin:${MAILU_VERSION:-1.7}
restart: always
env_file: mailu.env
volumes:
- "admin-data:/data"
- "admin-dkim:/dkim"
depends_on:
- redis
imap:
image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}dovecot:${MAILU_VERSION:-1.7}
restart: always
env_file: mailu.env
volumes:
- "dovecot-mail:/mail"
- "dovecot-overrides:/overrides"
depends_on:
- front
smtp:
image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}postfix:${MAILU_VERSION:-1.7}
restart: always
env_file: mailu.env
volumes:
- "postfix-overrides:/overrides"
depends_on:
- front
antispam:
image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}rspamd:${MAILU_VERSION:-1.7}
restart: always
env_file: mailu.env
volumes:
- "rspamd-filter:/var/lib/rspamd"
- "rspamd-dkim:/dkim"
- "rspamd-overrides:/etc/rspamd/override.d"
depends_on:
- front
# Optional services
antivirus:
image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}clamav:${MAILU_VERSION:-1.7}
restart: always
env_file: mailu.env
volumes:
- "clamav-data:/data"
webdav:
image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}radicale:${MAILU_VERSION:-1.7}
restart: always
env_file: mailu.env
volumes:
- "radicale-data:/data"
fetchmail:
image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}fetchmail:${MAILU_VERSION:-1.7}
restart: always
env_file: mailu.env
# Webmail
webmail:
image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}roundcube:${MAILU_VERSION:-1.7}
restart: always
env_file: mailu.env
volumes:
- "roundcube-data:/data"
depends_on:
- imap
volumes:
redis-data:
nginx-certs:
nginx-overrides:
admin-data:
admin-dkim:
dovecot-mail:
dovecot-overrides:
postfix-overrides:
rspamd-filter:
rspamd-dkim:
rspamd-overrides:
clamav-data:
radicale-data:
roundcube-data:
networks:
default:
driver: bridge
ipam:
driver: default
config:
- subnet: {{mailu_subnet}}