mailcow/docker-compose.override.yml

58 lines
1.8 KiB
YAML

version: '2.1'
services:
nginx-mailcow:
expose:
- "${HTTP_PORT:-80}"
networks:
proxy:
mailcow-network:
aliases:
- nginx
labels:
- traefik.enable=true
- traefik.docker.network=proxy
- traefik.http.routers.mail.entrypoints=websecure
- traefik.http.routers.mail.rule=Host(`${MAILCOW_HOSTNAME}`)
- "co.elastic.logs/module=nginx"
- "co.elastic.logs/fileset=access"
certdumper:
image: humenius/traefik-certs-dumper
restart: always
command: --restart-containers ${COMPOSE_PROJECT_NAME}-postfix-mailcow-1,${COMPOSE_PROJECT_NAME}-nginx-mailcow-1,${COMPOSE_PROJECT_NAME}-dovecot-mailcow-1
network_mode: none
volumes:
# Mount the folder which contains Traefik's `acme.json' file
- ${DATA_PATH}/traefik/letsencrypt:/traefik:ro
# Mount mailcow's SSL folder
- ./data/assets/ssl/:/output:rw
# Mount docker socket to restart containers
- /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}
healthcheck:
test: ["CMD", "/usr/bin/healthcheck"]
interval: 30s
timeout: 10s
retries: 5
ipv6nat-mailcow:
image: bash:latest
restart: "no"
entrypoint: ["echo", "ipv6nat disabled in compose.override.yml"]
networks:
mailcow-network:
driver_opts:
com.docker.network.bridge.name: br-mailcow
enable_ipv6: false
ipam:
driver: default
config:
- subnet: ${IPV4_NETWORK:-172.22.1}.0/24
# - subnet: ${IPV6_NETWORK:-fd4d:6169:6c63:6f77::/64}
proxy:
external: true