KazV2/dockers/postfix2/docker-compose.yml

41 lines
889 B
YAML
Raw Permalink Normal View History

2024-06-03 18:43:35 +02:00
services:
mail:
image: docker.io/mailserver/docker-mailserver:latest
hostname: ${smtpHost}
domainname: ${domain}
container_name: ${smtpServName}
networks:
- postfixNet
#ports:
#- ${MAIN_IP}:25:25
volumes:
- mailData:/var/mail
- mailState:/var/mail-state
- mailLog:/var/log/mail
- mailConfig:/tmp/docker-mailserver/
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- /etc/letsencrypt:/etc/letsencrypt:ro
environment:
- HOSTNAME=${smtpHost}
- DOMAINNAME=${domain}
- CONTAINER_NAME=${smtpServName}
env_file:
- env-config
- ../../secret/env-${smtpServName}
cap_add:
- NET_ADMIN
- SYS_PTRACE
restart: always
volumes:
mailData:
mailState:
mailLog:
mailConfig:
networks:
postfixNet:
external: true
name: postfixNet