diff --git a/__swarm/mailu3/docker-compose.yml b/__swarm/mailu3/docker-compose.yml index a3cc5f1..ae7e253 100755 --- a/__swarm/mailu3/docker-compose.yml +++ b/__swarm/mailu3/docker-compose.yml @@ -117,16 +117,16 @@ services: - webmail - radicale ports: - - 0.0.0.0:8880:80 - - 0.0.0.0:8443:443 - - 0.0.0.0:25:25 - - 0.0.0.0:465:465 - - 0.0.0.0:587:587 - - 0.0.0.0:110:110 - - 0.0.0.0:995:995 - - 0.0.0.0:143:143 - - 0.0.0.0:993:993 - - 0.0.0.0:4190:4190 + - '8880:80' + - '8443:443' + - '25:25' + - '465:465' + - '587:587' + - '110:110' + - '995:995' + - '143:143' + - '993:993' + - '4190:4190' restart: ${RESTART:-unless-stopped} volumes: - /share/docker_data/mailu3/certs:/certs diff --git a/__swarm/mailu3/mailu3-swarm.yml b/__swarm/mailu3/mailu3-swarm.yml new file mode 100644 index 0000000..6be6079 --- /dev/null +++ b/__swarm/mailu3/mailu3-swarm.yml @@ -0,0 +1,333 @@ +networks: + clamav: + driver: bridge + default: + driver: bridge + ipam: + config: + - subnet: 192.168.205.0/24 + driver: default + fts_attachments: + driver: bridge + internal: true + oletools: + driver: bridge + internal: true + radicale: + driver: bridge + webmail: + driver: bridge +services: + admin: + dns: + - 192.168.205.254 + env_file: stack.env + image: ${DOCKER_REGISTRY:-}ghcr.io/mailu/${DOCKER_PREFIX:-}admin:${MAILU_VERSION:-2024.06} + volumes: + - mailu3_data:/data + - mailu3_dkim:/dkim + deploy: + labels: + wud.watch: 'true' + wud.watch.digest: 'true' + replicas: 1 + placement: + constraints: + - node.role == manager + antispam: + dns: + - 192.168.205.254 + env_file: stack.env + hostname: antispam + image: ${DOCKER_REGISTRY:-}ghcr.io/mailu/${DOCKER_PREFIX:-}rspamd:${MAILU_VERSION:-2024.06} + networks: + - default + - oletools + - clamav + volumes: + - filter:/var/lib/rspamd + - rspamd:/overrides:ro + deploy: + labels: + wud.watch: 'true' + wud.watch.digest: 'true' + replicas: 1 + placement: + constraints: + - node.role == manager + antivirus: + healthcheck: + interval: 10s + retries: 3 + start_period: 10s + test: + - CMD-SHELL + - kill -0 `cat /tmp/clamd.pid` && kill -0 `cat /tmp/freshclam.pid` + timeout: 5s + image: ${DOCKER_REGISTRY:-}clamav/clamav-debian:1.2.0-6 + networks: + - clamav + volumes: + - clamav:/var/lib/clamav + deploy: + labels: + wud.watch: 'true' + wud.watch.digest: 'true' + replicas: 1 + placement: + constraints: + - node.role == manager + fetchmail: + dns: + - 192.168.205.254 + env_file: stack.env + image: ${DOCKER_REGISTRY:-}ghcr.io/mailu/${DOCKER_PREFIX:-}fetchmail:${MAILU_VERSION:-2024.06} + volumes: + - fetchmail:/data + deploy: + labels: + wud.watch: 'true' + wud.watch.digest: 'true' + replicas: 1 + placement: + constraints: + - node.role == manager + front: + dns: + - 192.168.205.254 + env_file: stack.env + extends: + file: logging.yml + service: ${LOGGING:-syslog} + image: ${DOCKER_REGISTRY:-}ghcr.io/mailu/${DOCKER_PREFIX:-}nginx:${MAILU_VERSION:-2024.06} + 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 + volumes: + - certs:/certs + - nginx:/overrides:ro + deploy: + 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' + replicas: 1 + placement: + constraints: + - node.role == manager + fts_attachments: + dns: + - 192.168.205.254 + healthcheck: + interval: 10s + retries: 3 + start_period: 10s + test: + - CMD-SHELL + - wget -nv -t1 -O /dev/null http://127.0.0.1:9998/tika || exit 1 + timeout: 5s + hostname: tika + image: ${DOCKER_REGISTRY:-}apache/tika:2.9.2.1-full + networks: + - fts_attachments + deploy: + labels: + wud.watch: 'true' + wud.watch.digest: 'true' + replicas: 1 + placement: + constraints: + - node.role == manager + imap: + dns: + - 192.168.205.254 + env_file: stack.env + image: ${DOCKER_REGISTRY:-}ghcr.io/mailu/${DOCKER_PREFIX:-}dovecot:${MAILU_VERSION:-2024.06} + networks: + - default + - fts_attachments + volumes: + - mail:/mail + - dovecot:/overrides:ro + deploy: + labels: + wud.watch: 'true' + wud.watch.digest: 'true' + replicas: 1 + placement: + constraints: + - node.role == manager + oletools: + dns: + - 192.168.205.254 + hostname: oletools + image: ${DOCKER_REGISTRY:-}ghcr.io/mailu/${DOCKER_PREFIX:-}oletools:${MAILU_VERSION:-2024.06} + networks: + - oletools + deploy: + labels: + wud.watch: 'true' + wud.watch.digest: 'true' + replicas: 1 + placement: + constraints: + - node.role == manager + redis: + dns: + - 192.168.205.254 + image: ${DOCKER_REGISTRY:-}redis:alpine + volumes: + - redis:/data + deploy: + labels: + wud.watch: 'true' + wud.watch.digest: 'true' + replicas: 1 + placement: + constraints: + - node.role == manager + resolver: + env_file: stack.env + image: ${DOCKER_REGISTRY:-}ghcr.io/mailu/${DOCKER_PREFIX:-}unbound:${MAILU_VERSION:-2024.06} + networks: + default: + ipv4_address: 192.168.205.254 + deploy: + labels: + wud.watch: 'true' + wud.watch.digest: 'true' + replicas: 1 + placement: + constraints: + - node.role == manager + smtp: + dns: + - 192.168.205.254 + env_file: stack.env + image: ${DOCKER_REGISTRY:-}ghcr.io/mailu/${DOCKER_PREFIX:-}postfix:${MAILU_VERSION:-2024.06} + volumes: + - mailqueue:/queue + - postfix:/overrides:ro + deploy: + labels: + wud.watch: 'true' + wud.watch.digest: 'true' + replicas: 1 + placement: + constraints: + - node.role == manager + webdav: + image: ${DOCKER_REGISTRY:-}ghcr.io/mailu/${DOCKER_PREFIX:-}radicale:${MAILU_VERSION:-2024.06} + networks: + - radicale + volumes: + - webdav:/data + deploy: + labels: + wud.watch: 'true' + wud.watch.digest: 'true' + replicas: 1 + placement: + constraints: + - node.role == manager + webmail: + env_file: stack.env + image: ${DOCKER_REGISTRY:-}ghcr.io/mailu/${DOCKER_PREFIX:-}webmail:${MAILU_VERSION:-2024.06} + networks: + - webmail + volumes: + - webmail_data:/data + - roundcube:/overrides:ro + deploy: + labels: + wud.watch: 'true' + wud.watch.digest: 'true' + replicas: 1 + placement: + constraints: + - node.role == manager + +volumes: + webmail_data: + driver: local + roundcube: + driver: local + webdav: + driver: local + mailqueue: + driver: local + postfix: + driver: local + redis: + driver: local + oletools: + driver: local + clamav: + driver: local + fetchmail: + driver: local + filter: + driver: local + rspamd: + driver: local + certs: + driver: local + nginx: + driver: local + mailu3_data: + driver: local + mailu3_dkim: + driver: local + mail: + driver: local + dovecot: + driver: local \ No newline at end of file