This repository has been archived on 2022-11-03. You can view files and clone it, but cannot push or open issues or pull requests.
docker_systems/docker-mailserver/docker-compose.yml

73 lines
1.8 KiB
YAML

version: "3.8"
services:
mail:
image: docker.io/mailserver/docker-mailserver:11.0.0
hostname: mail
domainname: zweili.org
env_file: mailserver.env
# To avoid conflicts with yaml base-60 float, DO NOT remove the quotation marks.
ports:
- "25:25"
- "143:143"
- "587:587"
- "993:993"
volumes:
- /var/lib/acme/mail.zweili.org:/etc/letsencrypt/live/mail.zweili.org:ro
- maildata:/var/mail
- mailstate:/var/mail-state
- ./sa-learn:/etc/cron.d/sa-learn
- maillogs:/var/log/mail
- config/:/tmp/docker-mailserver/
- /etc/localtime:/etc/localtime:ro
restart: unless-stopped
networks:
- mail-network
cap_add: ["NET_ADMIN", "SYS_PTRACE"]
snappymail:
image: fffrantz/snappymail:2.16.1
container_name: snappymail
ports:
- "8080:80"
restart: unless-stopped
depends_on:
- mail
networks:
- mail-network
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
mail-network:
name: mail-network
attachable: true
ipam:
driver: default
config:
- subnet: 172.18.0.0/16
ip_range: 172.18.5.0/24
gateway: 172.18.0.1
volumes:
maildata:
driver_opts:
type: "nfs"
o: "addr=10.7.89.108,nolock,hard,rw,vers=4.1"
device: ":/server_data/docker-mailserver/maildata"
mailstate:
driver_opts:
type: "nfs"
o: "addr=10.7.89.108,nolock,hard,rw,vers=4.1"
device: ":/server_data/docker-mailserver/mailstate"
maillogs:
driver_opts:
type: "nfs"
o: "addr=10.7.89.108,nolock,hard,rw,vers=4.1"
device: ":/server_data/docker-mailserver/maillogs"
config:
driver_opts:
type: "nfs"
o: "addr=10.7.89.108,nolock,hard,rw,vers=4.1"
device: ":/server_data/docker-mailserver/config"