Update Traefik

This commit is contained in:
whitney 2024-08-11 17:57:48 -07:00
parent a54e32a54b
commit 5a6672e923
9 changed files with 2 additions and 156 deletions

View File

@ -1,7 +1,5 @@
version: "3"
networks: networks:
traefik-network: traefik:
driver: bridge driver: bridge
name: traefik name: traefik

View File

@ -1,12 +0,0 @@
version: '3'
services:
step1-traefik:
image: traefik:v2.9
container_name: step1-traefik
command: --api.insecure=true --providers.docker
ports:
- "80:80"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock

View File

@ -1,17 +0,0 @@
version: '3'
services:
step2-traefik:
image: traefik:v2.9
container_name: step2-traefik
command: --api.insecure=true --providers.docker
ports:
- "80:80"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
step2-whoami:
image: traefik/whoami
container_name: step2-whoami
labels:
- "traefik.http.routers.whoami.rule=Host(`whoami.docker.localhost`)"

View File

@ -1,25 +0,0 @@
version: "3.3"
services:
traefik:
image: "traefik:v2.9"
container_name: "step3-traefik"
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
ports:
- "80:80"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
whoami:
image: "traefik/whoami"
container_name: "step3-whoami"
labels:
- "traefik.enable=true"
- "traefik.http.routers.whoami.rule=Host(`whoami.whitney.rip`)"
- "traefik.http.routers.whoami.entrypoints=web"

View File

@ -1,37 +0,0 @@
version: "3.3"
networks:
traefik-network:
services:
traefik:
image: "traefik:v2.9"
container_name: "traefik_whitney"
restart: always
networks:
- traefik-network
command:
#- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
ports:
- "80:80"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
whoami:
image: "traefik/whoami"
container_name: "whoami_whitney"
networks:
- traefik-network
labels:
- "traefik.enable=true"
- "traefik.http.routers.whoami.rule=Host(`whoami.whitney.rip`)"
- "traefik.http.routers.whoami.entrypoints=web"
depends_on:
- traefik

View File

@ -1,33 +0,0 @@
version: "3.3"
networks:
traefik-network:
services:
traefik:
image: "traefik:v2.9"
container_name: "traefik_whitney"
restart: always
networks:
- traefik-network
ports:
- "80:80"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "./step5-traefik.toml:/etc/traefik/traefik.toml"
- "./step5-traefik-dynamic.toml:/etc/traefik/dynamic/traefik-dynamic.toml"
whoami:
image: "traefik/whoami"
container_name: "whoami_whitney"
networks:
- traefik-network
labels:
- "traefik.enable=true"
- "traefik.http.routers.whoami.rule=Host(`whoami.whitney.rip`)"
- "traefik.http.routers.whoami.entrypoints=web"
depends_on:
- traefik

View File

@ -1 +0,0 @@
# Whitney Traefik Dynamic Config

View File

@ -1,27 +0,0 @@
# Whitney Traefik Static Config
[global]
checkNewVersion = true
sendAnonymousUsage = false
[entryPoints]
[entryPoints.web]
address = ":80"
[entryPoinst.websecure]
address = ":443"
[providers]
[providers.docker]
watch = true
network = "traefik_traefik-network"
[providers.file]
directory = "/etc/traefik/dynamic/"
watch = true
filename = "traefik-dynamic.toml"
[api]
insecure = true
dashboard = true
[log]
level = "error"

View File

@ -4,7 +4,7 @@
replacement = "http://www.whitney.com$${1}" replacement = "http://www.whitney.com$${1}"
permanent = true permanent = true
[http.middlewares.simpleAuth.basicAuth] [http.middlewares.simpleAuth.basicAuth]
users = ["olomana:$2y$05$k9MjyAQnhsdUiWY9laCzD.1Ckidw5IcM282RUgmUyOgHHo.YbtGmq"] users = ["olomana:password_hash"]
[http.routers.api] [http.routers.api]
rule = "Host(`monitor.whitney.rip`)" rule = "Host(`monitor.whitney.rip`)"