This commit is contained in:
2025-12-05 17:35:18 +01:00
parent cd45bf010a
commit 1880468c0a

View File

@@ -1,268 +1,290 @@
networks: networks:
default:
external: true
name: mailu_default
clamav: clamav:
external: true driver: overlay
default:
driver: overlay
ipam:
config:
- subnet: 192.168.205.0/24
driver: default
fts_attachments: fts_attachments:
external: true driver: overlay
internal: true
oletools: oletools:
external: true driver: overlay
internal: true
radicale: radicale:
external: true driver: overlay
webmail: webmail:
external: true driver: overlay
services: services:
admin: admin:
image: ${DOCKER_REGISTRY:-}ghcr.io/mailu/${DOCKER_PREFIX:-}admin:${MAILU_VERSION:-2024.06} image: ${DOCKER_REGISTRY:-}ghcr.io/mailu/${DOCKER_PREFIX:-}admin:${MAILU_VERSION:-2024.06}
env_file: stack.env env_file: stack.env
networks: labels:
- default wud.watch: true
dns: wud.watch.digest: true
- 192.168.205.254
volumes: volumes:
- data:/data - /share/docker_data/mailu3/data:/data
- dkim:/dkim - /share/docker_data/mailu3/dkim:/dkim
networks:
# Swarm uses service discovery, but requires network connection
- default
deploy: deploy:
restart_policy: restart_policy:
condition: any condition: ${RESTART:-unless-stopped}
labels: # DNS is handled by Swarm's internal DNS resolver (the resolver service will be discoverable by name)
wud.watch: "true"
wud.watch.digest: "true"
antispam: antispam:
image: ${DOCKER_REGISTRY:-}ghcr.io/mailu/${DOCKER_PREFIX:-}rspamd:${MAILU_VERSION:-2024.06} image: ${DOCKER_REGISTRY:-}ghcr.io/mailu/${DOCKER_PREFIX:-}rspamd:${MAILU_VERSION:-2024.06}
hostname: antispam
env_file: stack.env env_file: stack.env
dns: hostname: antispam
- 192.168.205.254 labels:
wud.watch: true
wud.watch.digest: true
volumes:
- /share/docker_data/mailu3/filter:/var/lib/rspamd
- /share/docker_data/mailu3/overrides/rspamd:/overrides:ro
networks: networks:
- default - default
- oletools - oletools
- clamav - clamav
volumes:
- antispam_filter:/var/lib/rspamd
- antispam_overrides:/overrides:ro
deploy: deploy:
restart_policy: restart_policy:
condition: any condition: ${RESTART:-unless-stopped}
labels:
wud.watch: "true"
wud.watch.digest: "true"
antivirus: antivirus:
image: ${DOCKER_REGISTRY:-}clamav/clamav-debian:1.2.0-6 image: ${DOCKER_REGISTRY:-}clamav/clamav-debian:1.2.0-6
labels:
wud.watch: true
wud.watch.digest: true
volumes:
- /share/docker_data/mailu3/filter/clamav:/var/lib/clamav
networks: networks:
- clamav - clamav
volumes:
- clamav:/var/lib/clamav
healthcheck: healthcheck:
test: ["CMD-SHELL", "kill -0 `cat /tmp/clamd.pid` && kill -0 `cat /tmp/freshclam.pid`"] test:
- CMD-SHELL
- kill -0 `cat /tmp/clamd.pid` && kill -0 `cat /tmp/freshclam.pid`
interval: 10s interval: 10s
timeout: 5s timeout: 5s
retries: 3 retries: 3
start_period: 10s start_period: 10s
deploy: deploy:
restart_policy: restart_policy:
condition: any condition: ${RESTART:-unless-stopped}
labels:
wud.watch: "true"
wud.watch.digest: "true"
fetchmail: fetchmail:
image: ${DOCKER_REGISTRY:-}ghcr.io/mailu/${DOCKER_PREFIX:-}fetchmail:${MAILU_VERSION:-2024.06} image: ${DOCKER_REGISTRY:-}ghcr.io/mailu/${DOCKER_PREFIX:-}fetchmail:${MAILU_VERSION:-2024.06}
env_file: stack.env env_file: stack.env
dns: labels:
- 192.168.205.254 wud.watch: true
wud.watch.digest: true
volumes: volumes:
- fetchmail:/data - /share/docker_data/mailu3/data/fetchmail:/data
networks: networks:
- default - default # Connect to 'default' for service discovery
deploy: deploy:
restart_policy: restart_policy:
condition: any condition: ${RESTART:-unless-stopped}
labels:
wud.watch: "true"
wud.watch.digest: "true"
front: front:
# NOTE: 'extends' is removed. You must manually define logging or accept default.
image: ${DOCKER_REGISTRY:-}ghcr.io/mailu/${DOCKER_PREFIX:-}nginx:${MAILU_VERSION:-2024.06} image: ${DOCKER_REGISTRY:-}ghcr.io/mailu/${DOCKER_PREFIX:-}nginx:${MAILU_VERSION:-2024.06}
env_file: stack.env env_file: stack.env
labels:
wud.watch: true
wud.watch.digest: true
homepage.container: mailu3-front-1
homepage.description: eMail server
homepage.group: Utilities
homepage.href: https://mail.sectorq.eu
homepage.icon: ${APPNAME}.png
homepage.name: Mailu
homepage.server: my-docker
homepage.weight: 1
volumes:
- /share/docker_data/mailu3/certs:/certs
- /share/docker_data/mailu3/overrides/nginx:/overrides:ro
networks: networks:
- default - default
- webmail - webmail
- radicale - radicale
ports: ports:
- "8880:80" - target: 80
- "8443:443" published: 8880
- "25:25" protocol: tcp
- "465:465" mode: ingress
- "587:587" - target: 443
- "110:110" published: 8443
- "995:995" protocol: tcp
- "143:143" mode: ingress
- "993:993" - target: 25
- "4190:4190" published: 25
volumes: protocol: tcp
- front_certs:/certs mode: ingress
- front_overrides:/overrides:ro - target: 465
dns: published: 465
- 192.168.205.254 protocol: tcp
mode: ingress
- target: 587
published: 587
protocol: tcp
mode: ingress
- target: 110
published: 110
protocol: tcp
mode: ingress
- target: 995
published: 995
protocol: tcp
mode: ingress
- target: 143
published: 143
protocol: tcp
mode: ingress
- target: 993
published: 993
protocol: tcp
mode: ingress
- target: 4190
published: 4190
protocol: tcp
mode: ingress
deploy: deploy:
restart_policy: restart_policy:
condition: any condition: ${RESTART:-unless-stopped}
placement:
constraints: [node.role == manager]
labels:
wud.watch: "true"
wud.watch.digest: "true"
fts_attachments: fts_attachments:
image: ${DOCKER_REGISTRY:-}apache/tika:2.9.2.1-full image: ${DOCKER_REGISTRY:-}apache/tika:2.9.2.1-full
hostname: tika hostname: tika
labels:
wud.watch: true
wud.watch.digest: true
networks: networks:
- fts_attachments - fts_attachments
dns:
- 192.168.205.254
healthcheck: healthcheck:
test: ["CMD-SHELL", "wget -nv -t1 -O /dev/null http://127.0.0.1:9998/tika || exit 1"] test:
- CMD-SHELL
- wget -nv -t1 -O /dev/null http://127.0.0.1:9998/tika || exit 1
interval: 10s interval: 10s
timeout: 5s timeout: 5s
retries: 3 retries: 3
start_period: 10s start_period: 10s
deploy: deploy:
restart_policy: restart_policy:
condition: any condition: ${RESTART:-unless-stopped}
labels:
wud.watch: "true"
wud.watch.digest: "true"
imap: imap:
image: ${DOCKER_REGISTRY:-}ghcr.io/mailu/${DOCKER_PREFIX:-}dovecot:${MAILU_VERSION:-2024.06} image: ${DOCKER_REGISTRY:-}ghcr.io/mailu/${DOCKER_PREFIX:-}dovecot:${MAILU_VERSION:-2024.06}
env_file: stack.env env_file: stack.env
dns: labels:
- 192.168.205.254 wud.watch: true
wud.watch.digest: true
volumes:
- /share/docker_data/mailu3/mail:/mail
- /share/docker_data/mailu3/overrides/dovecot:/overrides:ro
networks: networks:
- default - default
- fts_attachments - fts_attachments
volumes:
- imap_mail:/mail
- imap_dovecot:/overrides:ro
deploy: deploy:
restart_policy: restart_policy:
condition: any condition: ${RESTART:-unless-stopped}
labels:
wud.watch: "true"
wud.watch.digest: "true"
oletools: oletools:
image: ${DOCKER_REGISTRY:-}ghcr.io/mailu/${DOCKER_PREFIX:-}oletools:${MAILU_VERSION:-2024.06} image: ${DOCKER_REGISTRY:-}ghcr.io/mailu/${DOCKER_PREFIX:-}oletools:${MAILU_VERSION:-2024.06}
hostname: oletools hostname: oletools
labels:
wud.watch: true
wud.watch.digest: true
networks: networks:
- oletools - oletools
dns:
- 192.168.205.254
deploy: deploy:
restart_policy: restart_policy:
condition: any condition: ${RESTART:-unless-stopped}
labels:
wud.watch: "true"
wud.watch.digest: "true"
redis: redis:
image: ${DOCKER_REGISTRY:-}redis:alpine image: ${DOCKER_REGISTRY:-}redis:alpine
labels:
wud.watch: true
wud.watch.digest: true
volumes: volumes:
- redis:/data - /share/docker_data/mailu3/redis:/data
networks: networks:
- default - default # Connect to default network
dns:
- 192.168.205.254
deploy: deploy:
restart_policy: restart_policy:
condition: any condition: unless-stopped
labels:
wud.watch: "true"
wud.watch.digest: "true"
resolver: resolver:
image: ${DOCKER_REGISTRY:-}ghcr.io/mailu/${DOCKER_PREFIX:-}unbound:${MAILU_VERSION:-2024.06} image: ${DOCKER_REGISTRY:-}ghcr.io/mailu/${DOCKER_PREFIX:-}unbound:${MAILU_VERSION:-2024.06}
env_file: stack.env env_file: stack.env
labels:
wud.watch: true
wud.watch.digest: true
networks: networks:
default: default:
# NOTE: Swarm does not support static IPs for scaling.
# This will fail standard 'docker stack deploy'.
# For mailu, the static IP is critical, so we attempt to enforce it
# via the deploy key, but be aware this is highly non-standard.
# It's better to configure Mailu to use the service name 'resolver' instead of the static IP.
# If using a customized deployer:
# deploy:
# placement:
# constraints:
# - node.hostname == your-swarm-manager
# endpoint_mode: dnsrr
# mode: global
# replicas: 1
# labels:
# com.docker.stack.static_ips: 192.168.205.254
# com.docker.stack.static_network: default
ipv4_address: 192.168.205.254 ipv4_address: 192.168.205.254
deploy: deploy:
restart_policy: restart_policy:
condition: any condition: ${RESTART:-unless-stopped}
labels:
wud.watch: "true"
wud.watch.digest: "true"
smtp: smtp:
image: ${DOCKER_REGISTRY:-}ghcr.io/mailu/${DOCKER_PREFIX:-}postfix:${MAILU_VERSION:-2024.06} image: ${DOCKER_REGISTRY:-}ghcr.io/mailu/${DOCKER_PREFIX:-}postfix:${MAILU_VERSION:-2024.06}
env_file: stack.env env_file: stack.env
networks: labels:
- default wud.watch: true
dns: wud.watch.digest: true
- 192.168.205.254
volumes: volumes:
- snmp_mailqueue:/queue - /share/docker_data/mailu3/mailqueue:/queue
- snmp_postfix:/overrides:ro - /share/docker_data/mailu3/overrides/postfix:/overrides:ro
networks:
- default # Connect to default network
deploy: deploy:
restart_policy: restart_policy:
condition: any condition: ${RESTART:-unless-stopped}
labels:
wud.watch: "true"
wud.watch.digest: "true"
webdav: webdav:
image: ${DOCKER_REGISTRY:-}ghcr.io/mailu/${DOCKER_PREFIX:-}radicale:${MAILU_VERSION:-2024.06} image: ${DOCKER_REGISTRY:-}ghcr.io/mailu/${DOCKER_PREFIX:-}radicale:${MAILU_VERSION:-2024.06}
labels:
wud.watch: true
wud.watch.digest: true
volumes:
- /share/docker_data/mailu3/dav:/data
networks: networks:
- radicale - radicale
volumes:
- dav:/data
deploy: deploy:
restart_policy: restart_policy:
condition: any condition: ${RESTART:-unless-stopped}
labels:
wud.watch: "true"
wud.watch.digest: "true"
webmail: webmail:
image: ${DOCKER_REGISTRY:-}ghcr.io/mailu/${DOCKER_PREFIX:-}webmail:${MAILU_VERSION:-2024.06} image: ${DOCKER_REGISTRY:-}ghcr.io/mailu/${DOCKER_PREFIX:-}webmail:${MAILU_VERSION:-2024.06}
env_file: stack.env env_file: stack.env
labels:
wud.watch: true
wud.watch.digest: true
volumes:
- /share/docker_data/mailu3/webmail:/data
- /share/docker_data/mailu3/overrides/roundcube:/overrides:ro
networks: networks:
- webmail - webmail
volumes:
- webmail:/data
- roundcube:/overrides:ro
deploy: deploy:
restart_policy: restart_policy:
condition: any condition: ${RESTART:-unless-stopped}
labels:
wud.watch: "true"
wud.watch.digest: "true"
volumes:
data:
dkim:
antispam_filter:
antispam_overrides:
clamav:
fetchmail:
front_certs:
front_overrides:
fts_attachments:
imap_mail:
imap_dovecot:
redis:
snmp_mailqueue:
snmp_postfix:
dav:
webmail:
roundcube: