server-dotfiles/mail/docker-compose.yml

52 lines
1.1 KiB
YAML

version: '2'
services:
mail:
image: tvial/docker-mailserver:latest
hostname: ${HOSTNAME}
domainname: ${DOMAINNAME}
container_name: ${CONTAINER_NAME}
ports:
- "25:25"
- "143:143"
- "587:587"
- "993:993"
volumes:
- maildata:/var/mail
- mailstate:/var/mail-state
- maillogs:/var/log/mail
- ./config/:/tmp/docker-mailserver/
- nginx_cert:/etc/letsencrypt/live/mail.poldebra.me
env_file:
- .env
- env-mailserver
cap_add:
- NET_ADMIN
- SYS_PTRACE
restart: always
volumes:
maildata:
driver: local
driver_opts:
type: none
o: bind
device: "/srv/docker/mail/data"
mailstate:
driver: local
driver_opts:
type: none
o: bind
device: "/srv/docker/mail/state"
maillogs:
driver: local
driver_opts:
type: none
o: bind
device: "/srv/docker/mail/logs"
nginx_cert:
driver: local
driver_opts:
type: none
o: bind
device: "/srv/docker/reverse_proxy/certs/mail.poldebra.me"