mirror of
https://github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin.git
synced 2026-07-21 19:48:59 +02:00
🍱 change logging
This commit is contained in:
@@ -13,9 +13,9 @@ services:
|
|||||||
- "--providers.docker.exposedbydefault=false"
|
- "--providers.docker.exposedbydefault=false"
|
||||||
- "--entrypoints.web.address=:80"
|
- "--entrypoints.web.address=:80"
|
||||||
|
|
||||||
#- "--experimental.plugins.bouncer.modulename=github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin"
|
- "--experimental.plugins.bouncer.modulename=github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin"
|
||||||
#- "--experimental.plugins.bouncer.version=v1.0.9"
|
- "--experimental.plugins.bouncer.version=v1.1.2"
|
||||||
- "--experimental.localplugins.bouncer.modulename=github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin"
|
# - "--experimental.localplugins.bouncer.modulename=github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin"
|
||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||||
- logs-redis:/var/log/traefik
|
- logs-redis:/var/log/traefik
|
||||||
@@ -33,7 +33,7 @@ services:
|
|||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
# Definition of the router
|
# Definition of the router
|
||||||
- "traefik.http.routers.router1.rule=Path(`/foo`)"
|
- "traefik.http.routers.router1.rule=Host(`localhost`)"
|
||||||
- "traefik.http.routers.router1.entrypoints=web"
|
- "traefik.http.routers.router1.entrypoints=web"
|
||||||
- "traefik.http.routers.router1.middlewares=crowdsec1@docker"
|
- "traefik.http.routers.router1.middlewares=crowdsec1@docker"
|
||||||
# Definition of the service
|
# Definition of the service
|
||||||
@@ -48,11 +48,11 @@ services:
|
|||||||
image: 4206969/spiderfoot
|
image: 4206969/spiderfoot
|
||||||
container_name: "simple-service2"
|
container_name: "simple-service2"
|
||||||
volumes:
|
volumes:
|
||||||
- ./spiderfoot-data:/var/lib/spiderfoot
|
- spiderfoot-data:/var/lib/spiderfoot
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
# Definition of the router
|
# Definition of the router
|
||||||
- "traefik.http.routers.router2.rule=PathPrefix(`/`)"
|
- "traefik.http.routers.router2.rule=Host(`127.0.0.1`)"
|
||||||
- "traefik.http.routers.router2.entrypoints=web"
|
- "traefik.http.routers.router2.entrypoints=web"
|
||||||
- "traefik.http.routers.router2.middlewares=crowdsec1@docker"
|
- "traefik.http.routers.router2.middlewares=crowdsec1@docker"
|
||||||
# Definition of the service
|
# Definition of the service
|
||||||
@@ -94,3 +94,4 @@ volumes:
|
|||||||
crowdsec-db-redis:
|
crowdsec-db-redis:
|
||||||
crowdsec-config-redis:
|
crowdsec-config-redis:
|
||||||
redis-data:
|
redis-data:
|
||||||
|
spiderfoot-data:
|
||||||
|
|||||||
+3
-3
@@ -47,15 +47,15 @@ func askRedis(hostnamePort string, cmd RedisCmd, channel chan RedisCmd) {
|
|||||||
case "SET":
|
case "SET":
|
||||||
data := genRedisArray([]byte("SET"), []byte(cmd.Name), []byte(cmd.Data), []byte("EX"), []byte(fmt.Sprintf("%v", cmd.Duration)))
|
data := genRedisArray([]byte("SET"), []byte(cmd.Name), []byte(cmd.Data), []byte("EX"), []byte(fmt.Sprintf("%v", cmd.Duration)))
|
||||||
writer.PrintfLine(string(data))
|
writer.PrintfLine(string(data))
|
||||||
logger.Info("set")
|
logger.Debug("Redis set")
|
||||||
case "DEL":
|
case "DEL":
|
||||||
data := genRedisArray([]byte("DEL"), []byte(cmd.Name))
|
data := genRedisArray([]byte("DEL"), []byte(cmd.Name))
|
||||||
writer.PrintfLine(string(data))
|
writer.PrintfLine(string(data))
|
||||||
logger.Info("del")
|
logger.Debug("Redis del")
|
||||||
case "GET":
|
case "GET":
|
||||||
data := genRedisArray([]byte("GET"), []byte(cmd.Name))
|
data := genRedisArray([]byte("GET"), []byte(cmd.Name))
|
||||||
writer.PrintfLine(string(data))
|
writer.PrintfLine(string(data))
|
||||||
logger.Info("get")
|
logger.Debug("Redis get")
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case <-time.After(time.Second * 1):
|
case <-time.After(time.Second * 1):
|
||||||
|
|||||||
Reference in New Issue
Block a user