From 7c2ac9830dc13a8e6ca2cfefac9a3e86fbb3476a Mon Sep 17 00:00:00 2001 From: Max Lerebourg Date: Thu, 29 Sep 2022 07:45:23 +0200 Subject: [PATCH] :bento: push .local --- docker-compose.local.yml | 55 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 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..a3a4945 --- /dev/null +++ b/docker-compose.local.yml @@ -0,0 +1,55 @@ +version: "3.8" + +services: + traefik: + image: "traefik:v2.8.7" + container_name: "traefik" + command: + # - "--log.level=DEBUG" + - "--accesslog" + - "--accesslog.filepath=/var/log/traefik/traefik.log" + - "--api.insecure=true" + - "--providers.docker=true" + - "--providers.docker.exposedbydefault=false" + - "--entrypoints.web.address=:80" + + - "--experimental.localplugins.bouncer.modulename=github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin" + volumes: + - "/var/run/docker.sock:/var/run/docker.sock:ro" + - "logs:/var/log/traefik" + - ./:/plugins-local/src/github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin + ports: + - 8000:80 + - 8080:8080 + + whoami: + image: traefik/whoami + container_name: "simple-service" + labels: + - "traefik.enable=true" + - "traefik.http.routers.whoami.rule=Host(`localhost`)" + - "traefik.http.routers.whoami.entrypoints=web" + - "traefik.http.routers.whoami.middlewares=crowdsec@docker" + - "traefik.http.middlewares.crowdsec.plugin.bouncer.enabled=true" + - "traefik.http.middlewares.crowdsec.plugin.bouncer.crowdseclapikey=FIXME-LAPI-KEY" + + crowdsec: + image: crowdsecurity/crowdsec:v1.4.1 + container_name: "crowdsec" + command: rm -rf /etc/crowdsec/acquis.yaml + environment: + COLLECTIONS: crowdsecurity/traefik + CUSTOM_HOSTNAME: crowdsec + BOUNCER_KEY_TRAEFIK: FIXME-LAPI-KEY + depends_on: + - 'traefik' + volumes: + - ./acquis.yaml:/etc/crowdsec/acquis.yaml:ro + - logs:/var/log/traefik:ro + - crowdsec-db:/var/lib/crowdsec/data/ + - crowdsec-config:/etc/crowdsec/ + +volumes: + logs: + crowdsec-db: + crowdsec-config: \ No newline at end of file