From dbc99a9e4ea740177fae2db3db5c737a0640d0aa Mon Sep 17 00:00:00 2001 From: Dawid Bialy Date: Tue, 21 Feb 2023 11:56:07 +0100 Subject: [PATCH] use plugin from internet --- docker-compose.local.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 docker-compose.local.yml diff --git a/docker-compose.local.yml b/docker-compose.local.yml new file mode 100644 index 0000000..352e01a --- /dev/null +++ b/docker-compose.local.yml @@ -0,0 +1,36 @@ +services: + traefik: + # image: traefik:2.9 + build: + dockerfile: Dockerfile.dev + container_name: "traefik" + command: + - "--log.level=DEBUG" + - "--accesslog" + - "--accesslog.filepath=/var/log/traefik/access.log" + - "--api.insecure=true" + - "--providers.docker=true" + - "--providers.docker.exposedbydefault=false" + - "--entrypoints.web.address=:80" + + - "--experimental.localPlugins.traefik-cf-device-detector.modulename=github.com/davewhit3/traefik-cf-device-detector" + ports: + - "80:80" + - "8080:8080" + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - logs-local:/var/log/traefik + - .:/app + + whoami: + image: "traefik/whoami" + container_name: "simple-service" + labels: + - "traefik.enable=true" + - "traefik.http.middlewares.cfdevicedetect.plugin.cfdevicedetect.autodetect=true" + - "traefik.http.routers.whoami.rule=Host(`whoami.localhost`)" + - "traefik.http.routers.whoami.middlewares=cfdevicedetect@docker" + - "traefik.http.routers.whoami.entrypoints=web" + +volumes: + logs-local: \ No newline at end of file