|
|
|
version: '2'
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
|
|
|
http:
|
|
|
|
# build: $FRONTEND
|
|
|
|
image: mailu/$FRONTEND:$VERSION
|
|
|
|
restart: always
|
|
|
|
env_file: .env
|
|
|
|
ports:
|
|
|
|
- "$BIND_ADDRESS:80:80"
|
|
|
|
- "$BIND_ADDRESS:443:443"
|
|
|
|
volumes:
|
|
|
|
- "$ROOT/certs:/certs"
|
|
|
|
- /var/run/docker.sock:/docker.sock:ro
|
|
|
|
|
|
|
|
redis:
|
|
|
|
image: redis:latest
|
|
|
|
restart: always
|
|
|
|
volumes:
|
|
|
|
- "$ROOT/redis:/data"
|
|
|
|
|
|
|
|
imap:
|
|
|
|
# build: dovecot
|
|
|
|
image: mailu/dovecot:$VERSION
|
|
|
|
restart: always
|
|
|
|
env_file: .env
|
|
|
|
ports:
|
|
|
|
- "$BIND_ADDRESS:110:110"
|
|
|
|
- "$BIND_ADDRESS:143:143"
|
|
|
|
- "$BIND_ADDRESS:993:993"
|
|
|
|
- "$BIND_ADDRESS:995:995"
|
|
|
|
- "$BIND_ADDRESS:4190:4190"
|
|
|
|
volumes:
|
|
|
|
- "$ROOT/data:/data"
|
|
|
|
- "$ROOT/mail:/mail"
|
|
|
|
- "$ROOT/certs:/certs"
|
|
|
|
- "$ROOT/overrides:/overrides"
|
|
|
|
|
|
|
|
smtp:
|
|
|
|
# build: postfix
|
|
|
|
image: mailu/postfix:$VERSION
|
|
|
|
restart: always
|
|
|
|
env_file: .env
|
|
|
|
ports:
|
|
|
|
- "$BIND_ADDRESS:25:25"
|
|
|
|
- "$BIND_ADDRESS:465:465"
|
|
|
|
- "$BIND_ADDRESS:587:587"
|
|
|
|
volumes:
|
|
|
|
- "$ROOT/data:/data"
|
|
|
|
- "$ROOT/certs:/certs"
|
|
|
|
- "$ROOT/overrides:/overrides"
|
|
|
|
|
|
|
|
milter:
|
|
|
|
# build: rmilter
|
|
|
|
image: mailu/rmilter:$VERSION
|
|
|
|
restart: always
|
|
|
|
env_file: .env
|
|
|
|
volumes:
|
|
|
|
- "$ROOT/filter:/data"
|
|
|
|
- "$ROOT/dkim:/dkim"
|
|
|
|
- "$ROOT/overrides:/overrides"
|
|
|
|
|
|
|
|
antispam:
|
|
|
|
# build: rspamd
|
|
|
|
image: mailu/rspamd:$VERSION
|
|
|
|
restart: always
|
|
|
|
env_file: .env
|
|
|
|
volumes:
|
|
|
|
- "$ROOT/filter:/var/lib/rspamd"
|
|
|
|
|
|
|
|
antivirus:
|
|
|
|
# build: clamav
|
|
|
|
image: mailu/$ANTIVIRUS:$VERSION
|
|
|
|
restart: always
|
|
|
|
env_file: .env
|
|
|
|
volumes:
|
|
|
|
- "$ROOT/filter:/data"
|
|
|
|
|
|
|
|
webdav:
|
|
|
|
# build: $WEBDAV
|
|
|
|
image: mailu/$WEBDAV:$VERSION
|
|
|
|
restart: always
|
|
|
|
env_file: .env
|
|
|
|
volumes:
|
|
|
|
- "$ROOT/dav:/data"
|
|
|
|
|
|
|
|
admin:
|
|
|
|
# build: admin
|
|
|
|
image: mailu/admin:$VERSION
|
|
|
|
labels:
|
|
|
|
- traefik.enable=true
|
|
|
|
- traefik.frontend.rule=Host:$HOSTNAME;PathPrefix:/admin/
|
|
|
|
- traefik.root.frontend.rule=Host:$HOSTNAME;Path:/
|
|
|
|
- traefik.port=80
|
|
|
|
restart: always
|
|
|
|
env_file: .env
|
|
|
|
ports:
|
|
|
|
- "127.0.0.1:8000:80"
|
|
|
|
volumes:
|
|
|
|
- "$ROOT/data:/data"
|
|
|
|
- "$ROOT/dkim:/dkim"
|
|
|
|
- "$ROOT/certs:/certs"
|
|
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
|
|
|
|
|
|
webmail:
|
|
|
|
# build: "$WEBMAIL"
|
|
|
|
image: "mailu/$WEBMAIL:$VERSION"
|
|
|
|
labels:
|
|
|
|
- traefik.enable=true
|
|
|
|
- traefik.frontend.rule=Host:$HOSTNAME;PathPrefix:/webmail/
|
|
|
|
- traefik.port=80
|
|
|
|
restart: always
|
|
|
|
env_file: .env
|
|
|
|
volumes:
|
|
|
|
- "$ROOT/webmail:/data"
|
|
|
|
|
|
|
|
fetchmail:
|
|
|
|
# build: fetchmail
|
|
|
|
image: mailu/fetchmail:$VERSION
|
|
|
|
restart: always
|
|
|
|
env_file: .env
|
|
|
|
volumes:
|
|
|
|
- "$ROOT/data:/data"
|