From c6634cddac3cf5b4bf8429e98d43b80d50306524 Mon Sep 17 00:00:00 2001 From: furyhawk Date: Sun, 12 Apr 2026 00:17:26 +0800 Subject: [PATCH] fix: update Traefik volume configuration to use dedicated certificate storage --- swarm/core.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/swarm/core.yml b/swarm/core.yml index 5f262b5..c661061 100644 --- a/swarm/core.yml +++ b/swarm/core.yml @@ -105,8 +105,8 @@ services: volumes: # Add Docker as a mounted volume, so that Traefik can read the labels of other services - /var/run/docker.sock:/var/run/docker.sock:ro - # Mount ACME storage file from host - - /var/data/config/traefik/acme.json:/certificates/acme.json + # Mount the volume to store the certificates + - traefik-public-certificates:/certificates # Mount the configuration file for Traefik - /var/data/config/traefik/services.yml:/etc/traefik/services.yml:ro command: @@ -193,6 +193,12 @@ services: constraints: - node.role==manager +volumes: + # Create a volume to store the certificates, there is a constraint to make sure + # Traefik is always deployed to the same Docker node with the same volume containing + # the HTTPS certificates + traefik-public-certificates: + networks: # Use the previously created public network "traefik-public", shared with other # services that need to be publicly available via this Traefik