Guest User

traefik_Mailcow

a guest
Dec 9th, 2020
117
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. version: '2.1'
  2.  
  3. services:
  4.     ipv6nat-mailcow:
  5.       restart: "no"
  6.       entrypoint: ["echo", "ipv6nat disable in compose.overide.yml"]
  7.     nginx-mailcow:
  8.       networks:
  9.        # add Traefik's network
  10.         web:
  11.       labels:
  12.        - traefik.enable=true
  13.         # Creates a router called "moo" for the container, and sets up a rule to link the container to certain rule,
  14.         #   in this case, a Host rule with our MAILCOW_HOSTNAME var.
  15.         - traefik.http.routers.moo.rule=Host(`${MAILCOW_HOSTNAME}`)
  16.         # Enables tls over the router we created before.
  17.         - traefik.http.routers.moo.tls=true
  18.         # Specifies which kind of cert resolver we'll use, in this case le (Lets Encrypt).
  19.         - traefik.http.routers.moo.tls.certresolver=le
  20.         # Creates a service called "moo" for the container, and specifies which internal port of the container
  21.         #   should traefik route the incoming data to.
  22.         - traefik.http.services.moo.loadbalancer.server.port=8080
  23.         # Specifies which entrypoint (external port) should traefik listen to, for this container.
  24.         #   websecure being port 443, check the traefik.toml file liked above.
  25.         - traefik.http.routers.moo.entrypoints=https
  26.         # Make sure traefik uses the web network, not the mailcowdockerized_mailcow-network
  27.         - traefik.docker.network=web
  28.  
  29.     certdumper:
  30.         image: humenius/traefik-certs-dumper
  31.         container_name: traefik_certdumper
  32.         network_mode: none
  33.         volumes:
  34.          # mount the folder which contains Traefik's `acme.json' file
  35.           #   in this case Traefik is started from its own docker-compose in ../traefik
  36.           - /root/docker/traefik-v2/data:/traefik:ro
  37.           # mount mailcow's SSL folder
  38.           - ./data/assets/ssl/:/output:rw
  39.         environment:
  40.          # only change this, if you're using another domain for mailcow's web frontend compared to the standard config
  41.           - DOMAIN=${MAILCOW_HOSTNAME}
  42.  
  43. networks:
  44.   web:
  45.     external: true
  46.  
RAW Paste Data