Skip to content
Snippets Groups Projects
docker-compose.override.yml 4.33 KiB
version: '2.1'

services:

# Export der Letsencrypt-Zertifikate von traefik zur Verwendung in Postfix und Dovecot

    traefik-certdumper:
        image: humenius/traefik-certs-dumper
        restart: always
        network_mode: none
        command: --restart-containers mail_dovecot-mailcow_1,mail_postfix-mailcow_1,mail_nginx-mailcow_1,mail_watchdog-mailcow_1
        volumes:
          # mount the folder which contains Traefik's `acme.json' file
          - /srv/traefik/acme.json:/traefik/acme.json:ro
          # mount mailcow's SSL folder
          - ./data/assets/ssl/:/output:rw
          # Docker API for Container restart
          - /var/run/docker.sock:/var/run/docker.sock:ro
        environment:
          # only change this, if you're using another domain for mailcow's web frontend compared to the standard config
          - DOMAIN=${MAILCOW_HOSTNAME}


# Prometheus Postfix Exporter

    postfix-exporter:
        image: unikum/postfix_exporter:latest
        restart: always
        depends_on:
          - postfix-mailcow
        ports:
          - "{{ int_ip4 }}:9154:9154"
        volumes:
          - "postfix-vol-1:/var/spool/postfix:z"


# Labels für traefik Konfiguration
# Der Container nginx-mailcow benötigt zusätzlich den Alias sogo, damit der Container wegfallen kann

    nginx-mailcow:
      labels:
        - traefik.enable=true
        - traefik.http.routers.{{ servicename }}-mailcow.rule=Host(`${MAILCOW_HOSTNAME}`) || Host(`mail.warpzone.ms`)
        - traefik.http.routers.{{ servicename }}-mailcow.entrypoints=websecure
        - traefik.http.services.{{ servicename }}-mailcow.loadbalancer.server.port=42012
      networks:
        mailcow-network:
          aliases:
            - nginx
            - sogo
            - ejabberd
        web:
          aliases:
            - mailcow


# Mailman konfiguration in Postfix-Container mounten
# postfix ans mail netzwerk um mit mailman zu kommunizieren

    postfix-mailcow:
      volumes:
        - "{{ basedir }}/data/mailman-core/var/data:/opt/mailman:rw,z"
      networks:
        mail:
          aliases:
            - postfix


# Container anpassen um start zu unterbinden
    clamd-mailcow: