refactor: move traefik configuration to docker-compose files via labels

This commit is contained in:
2025-12-05 04:03:24 +01:00
parent d776124f26
commit fc6a11397b
17 changed files with 356 additions and 74 deletions
+26 -1
View File
@@ -9,6 +9,31 @@ services:
- ./termix-data:/app/data
environment:
PORT: "8080"
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik-proxy"
# Prod Router
- "traefik.http.routers.termix.rule=Host(`termix.forust.xyz`)"
- "traefik.http.routers.termix.entrypoints=websecure"
- "traefik.http.routers.termix.middlewares=security-headers"
- "traefik.http.routers.termix.service=termix"
- "traefik.http.routers.termix.tls=true"
- "traefik.http.services.termix.loadbalancer.server.port=8080"
# Local Router
- "traefik.http.routers.termix-local.rule=Host(`termix.workstation.local`) || Host(`termix.local`)"
- "traefik.http.routers.termix-local.entrypoints=websecure"
- "traefik.http.routers.termix-local.middlewares=security-headers"
- "traefik.http.routers.termix-local.service=termix"
- "traefik.http.routers.termix-local.tls=true"
# Dev Router
- "traefik.http.routers.termix-dev.rule=Host(`termix.gigaforust.local`)"
- "traefik.http.routers.termix-dev.entrypoints=websecure"
- "traefik.http.routers.termix-dev.middlewares=security-headers"
- "traefik.http.routers.termix-dev.service=termix"
- "traefik.http.routers.termix-dev.tls=true"
networks:
- traefik-proxy
@@ -18,4 +43,4 @@ networks:
volumes:
termix-data:
driver: local
driver: local