mirror of
https://github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin.git
synced 2026-07-21 11:38:59 +02:00
* Update readme, add about sectioj * Update readme about * Change parameter with capitalized letters * Add docker-compose local and docker-compose for real world utilization * Update readme and .traefik * update readme and docker-compose * Update .traefik Co-authored-by: MathieuHa <mathieu@hanotaux.fr>
53 lines
1.6 KiB
YAML
53 lines
1.6 KiB
YAML
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"
|
|
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: |