From 3a059fa17c36ede90d644f826e7e19a5c610eaaa Mon Sep 17 00:00:00 2001 From: Jan Kiesewetter <3628035+t3easy@users.noreply.github.com> Date: Sun, 30 Oct 2022 11:12:33 +0100 Subject: [PATCH 1/4] Add automatic container restart to Traefik example Also switch to volume as it is more flexible than recursive path and add examples for external name See: https://github.com/kereis/traefik-certs-dumper#automatic-container-restart --- docs/post_installation/firststeps-rp.en.md | 24 +++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/docs/post_installation/firststeps-rp.en.md b/docs/post_installation/firststeps-rp.en.md index 12871ceac..e0eea886b 100644 --- a/docs/post_installation/firststeps-rp.en.md +++ b/docs/post_installation/firststeps-rp.en.md @@ -192,7 +192,7 @@ version: '2.1' services: nginx-mailcow: networks: - # add Traefik's network + # Add Traefik's network web: labels: - traefik.enable=true @@ -214,14 +214,16 @@ services: certdumper: image: humenius/traefik-certs-dumper - container_name: traefik_certdumper + 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 - # in this case Traefik is started from its own docker compose in ../traefik - - ../traefik/data:/traefik:ro - # mount mailcow's SSL folder + # Mount the volume which contains Traefik's `acme.json' file + # Configure the external name in the volume definition + - acme:/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 restart: always environment: # only change this, if you're using another domain for mailcow's web frontend compared to the standard config @@ -230,6 +232,14 @@ services: networks: web: external: true + # Name of the external network + name: traefik_web + +volumes: + acme: + external: true + # Name of the external docker volume which contains Traefik's `acme.json' file + name: traefik_acme ``` Start the new containers with `docker compose up -d`. @@ -332,4 +342,4 @@ If you plan to use a server name that is not `MAILCOW_HOSTNAME` in your reverse ADDITIONAL_SERVER_NAMES=webmail.domain.tld,other.example.tld ``` -Run `docker compose up -d` to apply. \ No newline at end of file +Run `docker compose up -d` to apply. From 931e7f85edff6fa6615f85ccfabc5dc9370a9e22 Mon Sep 17 00:00:00 2001 From: Jan Kiesewetter <3628035+t3easy@users.noreply.github.com> Date: Sun, 30 Oct 2022 11:22:04 +0100 Subject: [PATCH 2/4] Add automatic container restart to Traefik example Also switch to volume as it is more flexible than recursive path and add examples for external name See: https://github.com/kereis/traefik-certs-dumper#automatic-container-restart --- docs/post_installation/firststeps-rp.de.md | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/docs/post_installation/firststeps-rp.de.md b/docs/post_installation/firststeps-rp.de.md index e1a89d40e..a8b0af928 100644 --- a/docs/post_installation/firststeps-rp.de.md +++ b/docs/post_installation/firststeps-rp.de.md @@ -212,14 +212,15 @@ services: certdumper: image: humenius/traefik-certs-dumper - container_name: traefik_certdumper + 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: - # mounten Sie den Ordner, der Traefiks `acme.json' Datei enthält - # in diesem Fall wird Traefik von seinem eigenen docker compose in ../traefik gestartet - - ../traefik/data:/traefik:ro + # Bilden Sie das Volume, das Traefiks `acme.json' Datei enthält, ein + - acme:/traefik:ro # SSL-Ordner von mailcow einhängen - ./data/assets/ssl/:/output:rw + # Binde den Docker socket ein um die Container neu zu starten + - /var/run/docker.sock:/var/run/docker.sock:ro restart: always environment: # Ändern Sie dies nur, wenn Sie eine andere Domain für Mailcows Web-Frontend verwenden als in der Standard-Konfiguration @@ -228,6 +229,14 @@ services: networks: web: external: true + # Name des externen Netzwerks + name: traefik_web + +volumes: + acme: + external: true + # Name des externen Docker Volumes, welches Traefiks `acme.json' Datei enthält + name: traefik_acme ``` Starten Sie die neuen Container mit `docker compose up -d`. @@ -330,4 +339,4 @@ Wenn Sie vorhaben, einen Servernamen zu verwenden, der nicht `MAILCOW_HOSTNAME` ADDITIONAL_SERVER_NAMES=webmail.domain.tld,other.example.tld ``` -Führen Sie `docker compose up -d` zum Anwenden aus. \ No newline at end of file +Führen Sie `docker compose up -d` zum Anwenden aus. From ad5ea1bd052e2e0e246dd2cc3910df1ba9329f35 Mon Sep 17 00:00:00 2001 From: Jan Kiesewetter <3628035+t3easy@users.noreply.github.com> Date: Sun, 30 Oct 2022 11:23:08 +0100 Subject: [PATCH 3/4] Fix whitespaces --- docs/post_installation/firststeps-rp.en.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/post_installation/firststeps-rp.en.md b/docs/post_installation/firststeps-rp.en.md index e0eea886b..617c56946 100644 --- a/docs/post_installation/firststeps-rp.en.md +++ b/docs/post_installation/firststeps-rp.en.md @@ -222,8 +222,8 @@ services: - acme:/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 + # Mount docker socket to restart containers + - /var/run/docker.sock:/var/run/docker.sock:ro restart: always environment: # only change this, if you're using another domain for mailcow's web frontend compared to the standard config From 7886ae1efafe520c6c5650835e01007589555478 Mon Sep 17 00:00:00 2001 From: Jan Kiesewetter <3628035+t3easy@users.noreply.github.com> Date: Thu, 3 Nov 2022 11:27:27 +0100 Subject: [PATCH 4/4] Fix typos --- docs/post_installation/firststeps-rp.de.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/post_installation/firststeps-rp.de.md b/docs/post_installation/firststeps-rp.de.md index a8b0af928..ef819d973 100644 --- a/docs/post_installation/firststeps-rp.de.md +++ b/docs/post_installation/firststeps-rp.de.md @@ -215,11 +215,11 @@ services: 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: - # Bilden Sie das Volume, das Traefiks `acme.json' Datei enthält, ein + # Binden Sie das Volume, das Traefiks `acme.json' Datei enthält, ein - acme:/traefik:ro # SSL-Ordner von mailcow einhängen - ./data/assets/ssl/:/output:rw - # Binde den Docker socket ein um die Container neu zu starten + # Binden Sie den Docker Socket ein, damit traefik-certs-dumper die Container neu starten kann - /var/run/docker.sock:/var/run/docker.sock:ro restart: always environment: