@@ -4,36 +4,36 @@ services:
4
4
container_name : " traefik"
5
5
restart : unless-stopped
6
6
command :
7
- # - "--log.level=DEBUG"
7
+ - " --log.level=DEBUG"
8
8
- " --accesslog"
9
9
- " --accesslog.filepath=/var/log/traefik/access.log"
10
10
- " --api.insecure=true"
11
11
- " --providers.docker=true"
12
12
- " --providers.docker.exposedbydefault=false"
13
13
- " --entrypoints.web.address=:80"
14
14
15
- - " --experimental.plugins.bouncer.modulename=github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin"
16
- - " --experimental.plugins.bouncer.version=v1.4.5"
17
- # - "--experimental.localplugins.bouncer.modulename=github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin"
15
+ # - "--experimental.plugins.bouncer.modulename=github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin"
16
+ # - "--experimental.plugins.bouncer.version=v1.4.5"
17
+ - " --experimental.localplugins.bouncer.modulename=github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin"
18
18
volumes :
19
19
- /var/run/docker.sock:/var/run/docker.sock:ro
20
- - logs-captcha-enabled:/var/log/traefik
21
- - ' ./captcha.html:/captcha.html'
22
- # - ./../../:/plugins-local/src/github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin
20
+ - logs-custom- captcha-enabled:/var/log/traefik
21
+ - " ./captcha.html:/captcha.html"
22
+ - ./../../:/plugins-local/src/github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin
23
23
ports :
24
24
- 8000:80
25
25
- 8080:8080
26
26
depends_on :
27
27
- crowdsec
28
28
29
- whoami :
29
+ whoami-foo :
30
30
image : traefik/whoami
31
- container_name : " whoaami "
31
+ container_name : " simple-service-custom-captcha-foo "
32
32
restart : unless-stopped
33
33
labels :
34
34
- " traefik.enable=true"
35
35
# Definition of the router
36
- - " traefik.http.routers.router-foo.rule=Host(`localhost `)"
36
+ - " traefik.http.routers.router-foo.rule=PathPrefix(`/foo `)"
37
37
- " traefik.http.routers.router-foo.entrypoints=web"
38
38
- " traefik.http.routers.router-foo.middlewares=crowdsec@docker"
39
39
# Definition of the service
@@ -42,7 +42,7 @@ services:
42
42
- " traefik.http.middlewares.crowdsec.plugin.bouncer.enabled=true"
43
43
- " traefik.http.middlewares.crowdsec.plugin.bouncer.crowdseclapikey=40796d93c2958f9e58345514e67740e5"
44
44
- " traefik.http.middlewares.crowdsec.plugin.bouncer.loglevel=DEBUG"
45
-
45
+
46
46
# Choose captcha provider
47
47
- " traefik.http.middlewares.crowdsec.plugin.bouncer.captchaProvider=custom"
48
48
- " traefik.http.middlewares.crowdsec.plugin.bouncer.captchaCustomJsURL=http://captcha.localhost:8080/fast.js"
@@ -54,7 +54,6 @@ services:
54
54
# Define captcha HTML file path
55
55
- " traefik.http.middlewares.crowdsec.plugin.bouncer.captchaHTMLFilePath=/captcha.html"
56
56
57
-
58
57
crowdsec :
59
58
image : crowdsecurity/crowdsec:v1.6.1-2
60
59
container_name : " crowdsec"
@@ -65,13 +64,13 @@ services:
65
64
BOUNCER_KEY_TRAEFIK_DEV : 40796d93c2958f9e58345514e67740e5
66
65
volumes :
67
66
# For captcha and ban mixed decision
68
- - ' ./profiles.yaml:/etc/crowdsec/profiles.yaml:ro'
67
+ - " ./profiles.yaml:/etc/crowdsec/profiles.yaml:ro"
69
68
# For captcha only remediation
70
69
# - './profiles_captcha_only.yaml:/etc/crowdsec/profiles.yaml:ro'
71
- - ' ./acquis.yaml:/etc/crowdsec/acquis.yaml:ro'
72
- - logs-captcha-enabled:/var/log/traefik:ro
73
- - crowdsec-db-captcha-enabled:/var/lib/crowdsec/data/
74
- - crowdsec-config-captcha-enabled:/etc/crowdsec/
70
+ - " ./acquis.yaml:/etc/crowdsec/acquis.yaml:ro"
71
+ - logs-custom- captcha-enabled:/var/log/traefik:ro
72
+ - crowdsec-db-custom- captcha-enabled:/var/lib/crowdsec/data/
73
+ - crowdsec-config-custom- captcha-enabled:/etc/crowdsec/
75
74
labels :
76
75
- " traefik.enable=false"
77
76
@@ -84,6 +83,10 @@ services:
84
83
- REDIS_ADDR=redis:6379
85
84
- DIFFICULTY=4
86
85
- ALLOWED_ORIGINS=*
86
+ - PRIVATE_KEY_PATH=/data/wicketkeeper.key
87
+ volumes :
88
+ - wicketkeeper-custom-captcha-enabled:/data
89
+ user : root
87
90
labels :
88
91
- " traefik.enable=true"
89
92
# Definition of the router
@@ -96,8 +99,9 @@ services:
96
99
97
100
redis :
98
101
image : redis/redis-stack-server:latest
99
-
102
+
100
103
volumes :
101
- logs-captcha-enabled :
102
- crowdsec-db-captcha-enabled :
103
- crowdsec-config-captcha-enabled :
104
+ logs-custom-captcha-enabled :
105
+ wicketkeeper-custom-captcha-enabled :
106
+ crowdsec-db-custom-captcha-enabled :
107
+ crowdsec-config-custom-captcha-enabled :
0 commit comments