Refactor Traefik local_core.yml to use traefik-public-certificates volume for certificate storage

This commit is contained in:
2024-09-11 12:25:10 +08:00
parent 87ed73492a
commit 6d531e0a25
+4 -4
View File
@@ -96,8 +96,8 @@ services:
# 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
- /var/data/config/traefik/acme.json:/certificates/acme.json
- traefik-public-certificates:/certificates
# - /var/data/config/traefik/acme.json:/certificates/acme.json
- /var/data/config/traefik/certs:/certs:ro
# Mount the configuration file for Traefik
- /var/data/config/traefik/local_dynamic.yml:/etc/traefik/local_dynamic.yml:ro
@@ -183,11 +183,11 @@ services:
constraints:
- node.role==manager
# volumes:
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:
traefik-public-certificates:
networks:
# Use the previously created public network "traefik-public", shared with other