From 9add5b2f825a7a047f5744ddce354f2204e7528d Mon Sep 17 00:00:00 2001 From: 3wc <3wc@doesthisthing.work> Date: Tue, 29 Jul 2025 17:29:38 +0100 Subject: [PATCH] Add challenge 9 --- 9/docker-compose.yml | 33 +++++++++++++++++++++++++++++++++ 9/traefik.yml | 14 ++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 9/docker-compose.yml create mode 100644 9/traefik.yml diff --git a/9/docker-compose.yml b/9/docker-compose.yml new file mode 100644 index 0000000..98a82b6 --- /dev/null +++ b/9/docker-compose.yml @@ -0,0 +1,33 @@ +--- +# TIP: Why isn't Traefik routing correctly? Don't peek at challenge 7 or 8! Try checking the Traefik dashboard on http://localhost:8080/dashboard/ + +services: + app: + image: git.autonomic.zone/autonomic-cooperative/docker-debugging-disco:0.1.0 + environment: + - CHALLENGE=7 + labels: + - "traefik.enable=true" + - "traefik.docker.network=proxy" + - "traefik.http.services.challenge-7.loadbalancer.server.port=80" + - "traefik.http.routers.challenge-7.rule=Host(`localhost`)" + + proxy: + image: traefik + volumes: + - /var/run/docker.sock:/var/run/docker.sock:ro + networks: + proxy: + configs: + - source: traefik_yml + target: /traefik.yml + ports: + - 8000:80 + - 8080:8080 + +networks: + proxy: + +configs: + traefik_yml: + file: traefik.yml diff --git a/9/traefik.yml b/9/traefik.yml new file mode 100644 index 0000000..87e721b --- /dev/null +++ b/9/traefik.yml @@ -0,0 +1,14 @@ +api: + dashboard: true + insecure: true + debug: true +entryPoints: + web: + address: ":80" +serversTransport: + insecureSkipVerify: true +providers: + docker: + endpoint: "unix:///var/run/docker.sock" + # exposedByDefault: false + network: proxy # Optional; Only use the "proxy" Docker network, even if containers are on multiple networks.