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/docs/compose/docker-compose.yml

201 lines
3.8 KiB
YAML

version: '2.1'
services:
front:
image: mailu/nginx:$VERSION
restart: always
env_file: .env
ports:
- "$BIND_ADDRESS4:80:80"
- "$BIND_ADDRESS4:443:443"
- "$BIND_ADDRESS4:110:110"
- "$BIND_ADDRESS4:143:143"
- "$BIND_ADDRESS4:993:993"
- "$BIND_ADDRESS4:995:995"
- "$BIND_ADDRESS4:25:25"
- "$BIND_ADDRESS4:465:465"
- "$BIND_ADDRESS4:587:587"
- "$BIND_ADDRESS6:80:80"
- "$BIND_ADDRESS6:443:443"
- "$BIND_ADDRESS6:110:110"
- "$BIND_ADDRESS6:143:143"
- "$BIND_ADDRESS6:993:993"
- "$BIND_ADDRESS6:995:995"
- "$BIND_ADDRESS6:25:25"
- "$BIND_ADDRESS6:465:465"
- "$BIND_ADDRESS6:587:587"
volumes:
- "$ROOT/certs:/certs"
depends_on:
- unbound
dns:
- ${IPV4_NETWORK:-172.22.1}.254
networks:
backend:
aliases:
- front
unbound:
image: mailu/unbound:$VERSION
restart: always
networks:
backend:
ipv4_address: ${IPV4_NETWORK:-172.22.1}.254
aliases:
- unbound
redis:
image: redis:alpine
restart: always
volumes:
- "$ROOT/redis:/data"
dns:
- ${IPV4_NETWORK:-172.22.1}.254
depends_on:
- unbound
networks:
backend:
aliases:
- redis
imap:
image: mailu/dovecot:$VERSION
restart: always
env_file: .env
volumes:
- "$ROOT/data:/data"
- "$ROOT/mail:/mail"
- "$ROOT/overrides:/overrides"
depends_on:
- front
- unbound
dns:
- ${IPV4_NETWORK:-172.22.1}.254
networks:
backend:
aliases:
- imap
smtp:
image: mailu/postfix:$VERSION
restart: always
env_file: .env
volumes:
- "$ROOT/data:/data"
- "$ROOT/overrides:/overrides"
depends_on:
- front
- unbound
dns:
- ${IPV4_NETWORK:-172.22.1}.254
networks:
backend:
aliases:
- smtp
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
- unbound
dns:
- ${IPV4_NETWORK:-172.22.1}.254
networks:
backend:
aliases:
- antispam
antivirus:
image: mailu/$ANTIVIRUS:$VERSION
restart: always
env_file: .env
volumes:
- "$ROOT/filter:/data"
depends_on:
- unbound
dns:
- ${IPV4_NETWORK:-172.22.1}.254
networks:
backend:
aliases:
- antivirus
webdav:
image: mailu/$WEBDAV:$VERSION
restart: always
env_file: .env
volumes:
- "$ROOT/dav:/data"
depends_on:
- unbound
dns:
- ${IPV4_NETWORK:-172.22.1}.254
networks:
backend:
aliases:
- webdav
admin:
image: mailu/admin:$VERSION
restart: always
env_file: .env
volumes:
- "$ROOT/data:/data"
- "$ROOT/dkim:/dkim"
- /var/run/docker.sock:/var/run/docker.sock:ro
depends_on:
- redis
- unbound
dns:
- ${IPV4_NETWORK:-172.22.1}.254
networks:
backend:
aliases:
- admin
webmail:
image: "mailu/$WEBMAIL:$VERSION"
restart: always
env_file: .env
volumes:
- "$ROOT/webmail:/data"
depends_on:
- imap
- unbound
dns:
- ${IPV4_NETWORK:-172.22.1}.254
networks:
backend:
aliases:
- webmail
fetchmail:
image: mailu/fetchmail:$VERSION
restart: always
env_file: .env
volumes:
- "$ROOT/data:/data"
depends_on:
- unbound
dns:
- ${IPV4_NETWORK:-172.22.1}.254
networks:
backend:
aliases:
- fetchmail
networks:
backend:
driver: bridge
ipam:
driver: default
config:
- subnet: ${IPV4_NETWORK:-172.22.1}.0/24