docker-deploy/mail/docker-compose.yml

81 lines
2.4 KiB
YAML

version: "3.9"
services:
mailserver:
image: esinio/mail
volumes:
- ./mail:/var/mail
- ./log:/var/log
ports:
- "25:25"
- 143:143
- 110:110
- 465:465
- 993:993
- 995:995
external_links:
- postgresql:dbserver
networks:
- traefik
- database
webmail:
image: roundcube/roundcubemail
labels:
- "traefik.enable=true"
- "traefik.http.routers.webmail.rule=Host(`mail.esin.io`)"
- "traefik.http.routers.webmail.tls=true"
- "traefik.http.routers.webmail.middlewares=webmail-mw"
- "traefik.http.middlewares.webmail-mw.compress=true"
- "traefik.http.services.webmail.loadbalancer.server.port=80"
environment:
- ROUNDCUBEMAIL_DEFAULT_HOST=mailserver
- ROUNDCUBEMAIL_DEFAULT_PORT=143
- ROUNDCUBEMAIL_SMTP_SERVER=mailserver
- ROUNDCUBEMAIL_SMTP_PORT=25
links:
- mailserver
depends_on:
- mailserver
networks:
- traefik
- database
postfixadmin:
image: postfixadmin:3.3.10-apache
labels:
- "traefik.enable=true"
- "traefik.http.routers.postfixadmin.rule=Host(`postfixadmin.esin.io`)"
- "traefik.http.routers.postfixadmin.tls=true"
- "traefik.http.routers.postfixadmin.middlewares=postfixadmin-mw"
- "traefik.http.middlewares.postfixadmin-mw.compress=true"
- "traefik.http.services.postfixadmin.loadbalancer.server.port=80"
environment:
- POSTFIXADMIN_SETUP_PASSWORD=${POSTFIXADMIN_SETUP_PASSWORD}
- POSTFIXADMIN_DB_TYPE=pgsql
- POSTFIXADMIN_DB_HOST=dbserver
- POSTFIXADMIN_DB_USER=${POSTGRES_USER}
- POSTFIXADMIN_DB_PASSWORD=${POSTGRES_PASSWORD}
- POSTFIXADMIN_DB_NAME=postfix
- POSTFIXADMIN_SMTP_SERVER=${POSTFIXADMIN_SMTP_SERVER}
- POSTFIXADMIN_SMTP_PORT=${POSTFIXADMIN_SMTP_PORT}
# - POSTFIXADMIN_DB_TYPE=mysqli
# - POSTFIXADMIN_DB_HOST=dbserver
# - POSTFIXADMIN_DB_USER=${MARIADB_USER}
# - POSTFIXADMIN_DB_PASSWORD=${MARIADB_PASSWORD}
# - POSTFIXADMIN_DB_NAME=postfix
# - POSTFIXADMIN_SMTP_SERVER=${POSTFIXADMIN_SMTP_SERVER}
# - POSTFIXADMIN_SMTP_PORT=${POSTFIXADMIN_SMTP_PORT}
restart: unless-stopped
external_links:
- postgresql:dbserver
links:
- mailserver
depends_on:
- mailserver
networks:
- traefik
- database
networks:
traefik:
external: true
database:
external: true