From 09af3a71f250ca7e6df189f801bfd55b0b76707f Mon Sep 17 00:00:00 2001 From: jaydee Date: Fri, 5 Dec 2025 14:18:29 +0100 Subject: [PATCH] build --- __swarm/mailu3/mailu3-swarm.yml | 428 ++++++++++++++++---------------- 1 file changed, 211 insertions(+), 217 deletions(-) diff --git a/__swarm/mailu3/mailu3-swarm.yml b/__swarm/mailu3/mailu3-swarm.yml index 737255d..384045b 100644 --- a/__swarm/mailu3/mailu3-swarm.yml +++ b/__swarm/mailu3/mailu3-swarm.yml @@ -1,256 +1,250 @@ +networks: + default: + external: true + name: mailu_default + + clamav: + external: true + + fts_attachments: + external: true + + oletools: + external: true + + radicale: + external: true + + webmail: + external: true + services: - redis: - image: redis:alpine - deploy: - replicas: 1 - restart_policy: - condition: any - placement: - constraints: - - node.role == manager - labels: - wud.watch: "true" - wud.watch.digest: "true" - volumes: - - redis_data:/data + admin: + image: ${DOCKER_REGISTRY:-}ghcr.io/mailu/${DOCKER_PREFIX:-}admin:${MAILU_VERSION:-2024.06} + env_file: stack.env networks: - default dns: - - 192.168.203.254 - - resolver: - image: ${DOCKER_ORG:-ghcr.io/mailu}/${DOCKER_PREFIX:-}unbound:${MAILU_VERSION:-2024.06} - env_file: stack.env + - 192.168.205.254 + volumes: + - data:/data + - dkim:/dkim deploy: - replicas: 1 restart_policy: condition: any - labels: - wud.watch: "true" - wud.watch.digest: "true" + labels: + wud.watch: "true" + wud.watch.digest: "true" + + antispam: + image: ${DOCKER_REGISTRY:-}ghcr.io/mailu/${DOCKER_PREFIX:-}rspamd:${MAILU_VERSION:-2024.06} + hostname: antispam + env_file: stack.env + dns: + - 192.168.205.254 networks: - default: - ipv4_address: 192.168.203.254 + - default + - oletools + - clamav + volumes: + - antispam_filter:/var/lib/rspamd + - antispam_overrides/rspamd:/overrides:ro + deploy: + restart_policy: + condition: any + labels: + wud.watch: "true" + wud.watch.digest: "true" + + antivirus: + image: ${DOCKER_REGISTRY:-}clamav/clamav-debian:1.2.0-6 + networks: + - clamav + volumes: + - clamav:/var/lib/clamav + healthcheck: + test: ["CMD-SHELL", "kill -0 `cat /tmp/clamd.pid` && kill -0 `cat /tmp/freshclam.pid`"] + interval: 10s + timeout: 5s + retries: 3 + start_period: 10s + deploy: + restart_policy: + condition: any + labels: + wud.watch: "true" + wud.watch.digest: "true" + + fetchmail: + image: ${DOCKER_REGISTRY:-}ghcr.io/mailu/${DOCKER_PREFIX:-}fetchmail:${MAILU_VERSION:-2024.06} + env_file: stack.env + dns: + - 192.168.205.254 + volumes: + - fetchmail:/data + networks: + - default + deploy: + restart_policy: + condition: any + labels: + wud.watch: "true" + wud.watch.digest: "true" front: - image: ${DOCKER_ORG:-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 - deploy: - replicas: 1 - restart_policy: - condition: any - 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-swarm - homepage.weight: "1" - placement: - constraints: - - node.role == manager networks: - default - webmail - radicale ports: - - target: 80 - published: 8880 - protocol: tcp - mode: ingress - - target: 443 - published: 8443 - protocol: tcp - mode: ingress - - target: 25 - published: 25 - protocol: tcp - mode: ingress - - target: 465 - published: 465 - 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 + - "8880:80" + - "8443:443" + - "25:25" + - "465:465" + - "587:587" + - "110:110" + - "995:995" + - "143:143" + - "993:993" + - "4190:4190" volumes: - - certs_data:/certs - - nginx_overrides:/overrides:ro + - front_certs:/certs + - front_overrides/nginx:/overrides:ro dns: - - 192.168.203.254 - depends_on: - - resolver - - admin: - image: ${DOCKER_ORG:-ghcr.io/mailu}/${DOCKER_PREFIX:-}admin:${MAILU_VERSION:-2024.06} - env_file: stack.env + - 192.168.205.254 deploy: - replicas: 1 restart_policy: condition: any - labels: - wud.watch: "true" - wud.watch.digest: "true" placement: - constraints: - - node.role == manager - volumes: - - admin_data:/data - - admin_dkim:/dkim - depends_on: - - redis - - resolver - dns: - - 192.168.203.254 + constraints: [node.role == manager] + labels: + wud.watch: "true" + wud.watch.digest: "true" + + fts_attachments: + image: ${DOCKER_REGISTRY:-}apache/tika:2.9.2.1-full + hostname: tika networks: - - default + - fts_attachments + dns: + - 192.168.205.254 + healthcheck: + test: ["CMD-SHELL", "wget -nv -t1 -O /dev/null http://127.0.0.1:9998/tika || exit 1"] + interval: 10s + timeout: 5s + retries: 3 + start_period: 10s + deploy: + restart_policy: + condition: any + labels: + wud.watch: "true" + wud.watch.digest: "true" imap: - image: ${DOCKER_ORG:-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 - deploy: - replicas: 1 - restart_policy: - condition: any - labels: - wud.watch: "true" - wud.watch.digest: "true" - placement: - constraints: - - node.role == manager - volumes: - - mail_data:/mail - - dovecot_overrides:/overrides:ro + dns: + - 192.168.205.254 networks: - default - depends_on: - - front - - resolver + - fts_attachments + volumes: + - imap_mail:/mail + - imap_dovecot:/overrides:ro + deploy: + restart_policy: + condition: any + labels: + wud.watch: "true" + wud.watch.digest: "true" + + oletools: + image: ${DOCKER_REGISTRY:-}ghcr.io/mailu/${DOCKER_PREFIX:-}oletools:${MAILU_VERSION:-2024.06} + hostname: oletools + networks: + - oletools dns: - - 192.168.203.254 + - 192.168.205.254 + deploy: + restart_policy: + condition: any + labels: + wud.watch: "true" + wud.watch.digest: "true" + + redis: + image: ${DOCKER_REGISTRY:-}redis:alpine + volumes: + - redis:/data + networks: + - default + dns: + - 192.168.205.254 + deploy: + restart_policy: + condition: any + labels: + wud.watch: "true" + wud.watch.digest: "true" + + resolver: + image: ${DOCKER_REGISTRY:-}ghcr.io/mailu/${DOCKER_PREFIX:-}unbound:${MAILU_VERSION:-2024.06} + env_file: stack.env + networks: + default: + ipv4_address: 192.168.205.254 + deploy: + restart_policy: + condition: any + labels: + wud.watch: "true" + wud.watch.digest: "true" smtp: - image: ${DOCKER_ORG:-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 - deploy: - replicas: 1 - restart_policy: - condition: any - labels: - wud.watch: "true" - wud.watch.digest: "true" - placement: - constraints: - - node.role == manager - volumes: - - mailqueue_data:/queue - - postfix_overrides:/overrides:ro networks: - default - depends_on: - - front - - resolver dns: - - 192.168.203.254 - - oletools: - image: ${DOCKER_ORG:-ghcr.io/mailu}/${DOCKER_PREFIX:-}oletools:${MAILU_VERSION:-2024.06} - hostname: oletools - deploy: - replicas: 1 - restart_policy: - condition: any - labels: - wud.watch: "true" - wud.watch.digest: "true" - placement: - constraints: - - node.role == manager - networks: - - oletools - depends_on: - - resolver - dns: - - 192.168.203.254 - - antispam: - image: ${DOCKER_ORG:-ghcr.io/mailu}/${DOCKER_PREFIX:-}rspamd:${MAILU_VERSION:-2024.06} - hostname: antispam - env_file: stack.env - deploy: - replicas: 1 - restart_policy: - condition: any - labels: - wud.watch: "true" - wud.watch.digest: "true" - placement: - constraints: - - node.role == manager + - 192.168.205.254 volumes: - - filter_data:/var/lib/rspamd - - rspamd_overrides:/overrides:ro - networks: - - default - - oletools - depends_on: - - front - - redis - - oletools - - resolver - dns: - - 192.168.203.254 + - snmp_mailqueue:/queue + - snmp_postfix:/overrides:ro + deploy: + restart_policy: + condition: any + labels: + wud.watch: "true" + wud.watch.digest: "true" + + webdav: + image: ${DOCKER_REGISTRY:-}ghcr.io/mailu/${DOCKER_PREFIX:-}radicale:${MAILU_VERSION:-2024.06} + networks: + - radicale + volumes: + - dav:/data + deploy: + restart_policy: + condition: any + labels: + wud.watch: "true" + wud.watch.digest: "true" -networks: - default: - driver: overlay - ipam: - driver: default - config: - - subnet: 192.168.203.0/24 - oletools: - driver: overlay - internal: true webmail: - driver: overlay - radicale: - driver: overlay - -volumes: - redis_data: - admin_data: - admin_dkim: - mail_data: - dovecot_overrides: - mailqueue_data: - postfix_overrides: - filter_data: - rspamd_overrides: - certs_data: - nginx_overrides: + image: ${DOCKER_REGISTRY:-}ghcr.io/mailu/${DOCKER_PREFIX:-}webmail:${MAILU_VERSION:-2024.06} + env_file: stack.env + networks: + - webmail + volumes: + - webmail:/data + - roundcube:/overrides:ro + deploy: + restart_policy: + condition: any + labels: + wud.watch: "true" + wud.watch.digest: "true" \ No newline at end of file