fix: update Traefik volume configuration to use host-based ACME storage

This commit is contained in:
2026-04-11 23:55:14 +08:00
parent b3936a3cab
commit 832da6ee78
+2 -8
View File
@@ -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 the volume to store the certificates
- traefik-public-certificates:/certificates
# Mount ACME storage file from host
- /var/data/config/traefik/acme.json:/certificates/acme.json
# Mount the configuration file for Traefik
- /var/data/config/traefik/services.yml:/etc/traefik/services.yml:ro
command:
@@ -193,12 +193,6 @@ 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