version: '3' services: smtp: container_name: smtp build: ./smtp restart: always depends_on: - imap - db ports: - '25:25' - '587:587' links: - imap:imap - db:db - spam:spam - mailman-core:mailman-core volumes: - /data_test/mailserver/mailman/core:/mailman - mails:/home/vmail - /dev/log:/dev/log - certs:/certs environment: - DATABASE_USER=mail - DATABASE_PASSWORD=98ewtx9mwh4e9x - DATABASE_NAME=postfix - MYORIGIN=creditcards.bayern - MYHOSTNAME=mail.creditcards.bayern labels: - "traefik.enable=false" networks: default: aliases: - smtp imap: container_name: imap build: ./imap restart: always depends_on: - db ports: - '993:993' - '4190:4190' expose: - '24' - '8472' - '993' links: - db - spam volumes: - mails:/home/vmail - certs:/certs environment: - "DATABASE_USER=mail" - "DATABASE_PASSWORD=98ewtx9mwh4e9x" - "DATABASE_NAME=postfix" - "MAILDOMAIN=mail.creditcards.bayern" labels: - "traefik.enable=false" spam: container_name: spam build: ./spam restart: always expose: - 11334 - 11332 volumes: - spam:/data_test - /data_test/rspamd/:/var/lib/rspamd - /etc/localtime:/etc/localtime:ro environment: - PASSWORD=feelsnotverysecure - PORT=11334 labels: - "traefik.frontend.rule=Host:spam.creditcards.bayern" - "traefik.port=11334" webmail: container_name: webmail image: roundcube/roundcubemail:latest-apache depends_on: - smtp - imap - db restart: always links: - imap:imap - smtp:smtp environment: ROUNDCUBEMAIL_DEFAULT_HOST: "ssl://imap" ROUNDCUBEMAIL_DEFAULT_PORT: "993" ROUNDCUBEMAIL_SMTP_SERVER: "tls://smtp" ROUNDCUBEMAIL_SMTP_PORT: 587 ROUNDCUBEMAIL_PLUGINS: archive,zipdownload,managesieve,password ROUNDCUBEMAIL_UPLOAD_MAX_FILESIZE: 100M ROUNDCUBEMAIL_DB_TYPE: mysql ROUNDCUBEMAIL_DB_HOST: db ROUNDCUBEMAIL_DB_USER: mail ROUNDCUBEMAIL_DB_PASSWORD: 98ewtx9mwh4e9x ROUNDCUBEMAIL_DB_NAME: roundcube volumes: - ./webmail/config.inc.php:/var/roundcube/config/config.inc.php labels: - "traefik.frontend.rule=Host:mail.creditcards.bayern" - "traefik.port=80" admin: container_name: admin links: - db:db depends_on: - db image: hardware/postfixadmin:latest expose: - "8888" restart: always environment: DBTYPPE: mysql DBHOST: db DBUSER: mail DBNAME: postfix DBPASS: 98ewtx9mwh4e9x SMTPHOST: smtp DOMAIN: creditcards.bayern labels: - "traefik.frontend.rule=Host:admin.creditcards.bayern" - "traefik.port=8888" db: container_name: mariadb image: mariadb:10.3 restart: always environment: MYSQL_ROOT_PASSWORD: kf43,cj,ewft3jr4 MYSQL_DATABASES: "postfix mailman roundcube" MYSQL_USER: mail MYSQL_PASSWORD: 98ewtx9mwh4e9x volumes: - /data_test/mailserver/db:/var/lib/mysql - ./db/docker-entrypoint.sh:/docker-entrypoint.sh - /var/docker/mailserver/db:/docker-entrypoint-initdb.d labels: - "traefik.enable=false" mailman-core: image: maxking/mailman-core:latest container_name: mailman-core hostname: mailman-core volumes: - /data_test/mailserver/mailman/core:/opt/mailman/ - ./mailman-extra.cfg:/opt/mailman/mailman-extra.cfg links: - db:db expose: - 8024 - 8001 depends_on: - db environment: - DATABASE_URL=mysql://mail:98ewtx9mwh4e9x@db/mailman - DATABASE_TYPE=mysql - DATABASE_CLASS=mailman.database.mysql.MySQLDatabase - HYPERKITTY_API_KEY=someapikey - MM_HOSTNAME=mailman-core - SMTP_PORT=587 - SMTP_HOST=smtp - MTA=postfix labels: - "traefik.enable=false" mailman-web: image: maxking/mailman-web:latest container_name: mailman-web hostname: mailman-web expose: - 8000 - 8080 depends_on: - db links: - mailman-core:mailman-core - db:db - smtp:smtp volumes: - ./settings_local.py:/opt/mailman/web/settings_local.py - /data_test/mailserver/mailman/web:/opt/mailman-web-data - /data_test/mailserver/mailman/core:/var/mailman_ environment: - DATABASE_URL=mysql://mail:98ewtx9mwh4e9x@db/mailman - DATABASE_TYPE=mysql - HYPERKITTY_API_KEY=someapikey - SECRET_KEY=feelsnotverysecure - DYLD_LIBRARY_PATH=/usr/local/mysql/lib/ - SERVE_FROM_DOMAIN=lists.creditcards.bayern - DJANGO_ALLOWED_HOSTS=mailman.creditcards.bayern - MAILMAN_ADMIN_USER=admin - MAILMAN_ADMIN_EMAIL=a3x@eris.cc - UWSGI_STATIC_MAP=/static=/opt/mailman-web-data/static - SMTP_PORT=587 - SMTP_HOST=smtp labels: #- "traefik.frontend.rule=Host:mailman.creditcards.bayern" #- "traefik.port=8000" - "traefik.enable=false" nginx: container_name: nginx image: nginx:mainline restart: always expose: - 80 links: - mailman-web:mailman-web volumes: - ./nginx/:/etc/nginx/conf.d/ - /data_test/mailserver/mailman/web:/opt/mailman/ labels: - "traefik.frontend.rule=Host:mailman.creditcards.bayern" - "traefik.port=80" traefik: container_name: traefik image: traefik command: --api --docker # Enables the web UI and tells Traefik to listen to docker restart: always ports: - "80:80" - "443:443" - "8080:8080" volumes: - /var/run/docker.sock:/var/run/docker.sock - ./traefik/:/etc/traefik labels: - "traefik.frontend.rule=Host:traefik.creditcards.bayern" extractor: container_name: extractor image: danielhuisman/traefik-certificate-extractor volumes: - /data_test/mailserver/traefik:/app/data - certs:/app/certs_flat labels: - "traefik.enable=false" networks: default: volumes: mails: certs: spam: