Skip to content

Commit 2ae8d4f

Browse files
committed
fix for rendering
1 parent 3ae4af0 commit 2ae8d4f

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

docker/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,29 @@ docker run -d -p 8080:80 \
5757
--name openresty crowdsecurity/crowdsec-openresty
5858
```
5959

60+
Or you can pass the whole bouncer config through the docker compose enviroment
61+
62+
```code
63+
... in docker-compose.yml
64+
...
65+
environment:
66+
BOUNCER_CONFIG: |
67+
API_KEY=${CROWDSEC_BOUNCER_OPENRESTY_APIKEY}
68+
API_URL=http://crowdsec:8080
69+
CAPTCHA_PROVIDER=${CROWDSEC_BOUNCER_OPENRESTY_CAPTCHA_PROVIDER}
70+
SECRET_KEY=${CROWDSEC_BOUNCER_OPENRESTY_SECRET_KEY}
71+
SITE_KEY=${CROWDSEC_BOUNCER_OPENRESTY_SITE_KEY}
72+
FALLBACK_REMEDIATION=ban
73+
MODE=stream
74+
BOUNCING_ON_TYPE=all
75+
CAPTCHA_TEMPLATE_PATH=/var/lib/crowdsec/lua/templates/captcha.html
76+
BAN_TEMPLATE_PATH=/var/lib/crowdsec/lua/templates/ban.html
77+
ALWAYS_SEND_TO_APPSEC=true
78+
SSL_VERIFY=false
79+
APPSEC_URL=http://crowdsec:7422
80+
...
81+
```
82+
6083
### Configuration
6184

6285
The bouncer uses [lua_shared_dict](https://github.com/openresty/lua-nginx-module#lua_shared_dict) to share cache between all workers.

docker/docker_start.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
#!/bin/bash
2+
23
#set -x
34
CROWDSEC_BOUNCER_CONFIG="/etc/crowdsec/bouncers/crowdsec-openresty-bouncer.conf"
45

56
if [ "$BOUNCER_CONFIG" != "" ]; then
6-
CROWDSEC_BOUNCER_CONFIG="$BOUNCER_CONFIG"
7+
echo "$BOUNCER_CONFIG" > $CROWDSEC_BOUNCER_CONFIG
78
fi
89
if [ "$API_URL" != "" ]; then
910
sed -i "s,API_URL.*,API_URL=$API_URL," "$CROWDSEC_BOUNCER_CONFIG"

0 commit comments

Comments
 (0)