Refactor swarm/core.yml to mount services.yml as a read-only file

This commit is contained in:
2024-06-09 08:59:32 +08:00
parent 0d02f5b7b6
commit 30bc4fabfc
2 changed files with 19 additions and 0 deletions
+2
View File
@@ -79,6 +79,7 @@ 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/services.yml:/etc/traefik/services.yml:ro
command:
# Enable Docker in Traefik, so that it reads labels from Docker services
- --providers.docker
@@ -91,6 +92,7 @@ services:
- --providers.swarm.exposedbydefault=false
- --providers.swarm.endpoint=unix:///var/run/docker.sock
- --providers.swarm.network=traefik-public
- --providers.file.filename=/etc/traefik/services.yml
# Create an entrypoint "http" listening on port 80
- --entrypoints.http.address=:80
# Create an entrypoint "https" listening on port 443
+17
View File
@@ -0,0 +1,17 @@
http:
routers:
traefik-public-https:
entryPoints:
- https
rule: Host(`coco.furyhawk.lol`)
tls:
certResolver: le
service: coco_desktop@file
services:
coco_desktop:
loadBalancer:
servers:
- url: http://192.168.50.178:5000