File tree Expand file tree Collapse file tree 4 files changed +28
-1
lines changed Expand file tree Collapse file tree 4 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ The following images are built:
2222** latest**
2323- OpenResty
2424- Lua
25+ - [ Crowdsec Openresty Bouncer] ( https://github.com/crowdsecurity/cs-openresty-bouncer )
2526
2627** certbot**
2728- Certbot
Original file line number Diff line number Diff line change @@ -73,8 +73,10 @@ COPY --from=nginxbuilder /tmp/openresty /tmp/openresty
7373COPY ./scripts/install-openresty /tmp/install-openresty
7474
7575ARG OPENRESTY_VERSION
76+ ARG CROWDSEC_OPENRESTY_BOUNCER_VERSION
7677ENV SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt \
77- OPENRESTY_VERSION=${OPENRESTY_VERSION}
78+ OPENRESTY_VERSION=${OPENRESTY_VERSION} \
79+ CROWDSEC_OPENRESTY_BOUNCER_VERSION=${CROWDSEC_OPENRESTY_BOUNCER_VERSION}
7880
7981# Install openresty, lua, then clean up file system
8082RUN apt-get update \
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ RESET='\E[0m'
99DOCKER_IMAGE=nginxproxymanager/nginx-full
1010
1111export OPENRESTY_VERSION=1.19.9.1
12+ export CROWDSEC_OPENRESTY_BOUNCER_VERSION=0.1.1
1213export LUA_VERSION=5.1.5
1314export LUAROCKS_VERSION=3.3.1
1415
@@ -18,6 +19,7 @@ echo -e "${BLUE}❯ ${CYAN}Building ${YELLOW}latest ${CYAN}...${RESET}"
1819docker build \
1920 --pull \
2021 --build-arg OPENRESTY_VERSION \
22+ --build-arg CROWDSEC_OPENRESTY_BOUNCER_VERSION \
2123 --build-arg LUA_VERSION \
2224 --build-arg LUAROCKS_VERSION \
2325 -t ${DOCKER_IMAGE} :latest \
Original file line number Diff line number Diff line change 1+ #! /bin/bash -e
2+
3+ BLUE=' \E[1;34m'
4+ CYAN=' \E[1;36m'
5+ YELLOW=' \E[1;33m'
6+ GREEN=' \E[1;32m'
7+ RESET=' \E[0m'
8+
9+ echo -e " ${BLUE} ❯ ${CYAN} Installing Crowdsec OpenResty Bouncer ${YELLOW}${CROWDSEC_OPENRESTY_BOUNCER_VERSION} ...${RESET} "
10+
11+ cd /tmp
12+ # Offical Crowdsec download location is currently blocked due to two pull requests waiting to be added for full support for Docker installs
13+ # weg "https://github.com/crowdsecurity/cs-openresty-bouncer/releases/download/v${CROWDSEC_OPENRESTY_BOUNCER_VERSION}/crowdsec-openresty-bouncer.tgz"
14+ wget " https://github.com/LePresidente/cs-openresty-bouncer/releases/download/v${CROWDSEC_OPENRESTY_BOUNCER_VERSION} /crowdsec-openresty-bouncer.tgz"
15+ mkdir -p /tmp/crowdsec
16+ tar -xzf --strip 1 crowdsec-openresty-bouncer.tgz -C /tmp/crowdsec
17+ cd /tmp/crowdsec
18+
19+ bash ./install.sh --NGINX_CONF_DIR=/etc/nginx/conf.d --LIB_PATH=/etc/nginx/lualib --CONFIG_PATH=/defaults/crowdsec --DATA_PATH=/defaults/crowdsec --docker
20+ sed-patch ' s|ENABLED=.*|ENABLED=false|' /defaults/crowdsec/crowdsec-openresty-bouncer.conf
21+
22+ echo -e " ${BLUE} ❯ ${GREEN} OpenResty plugins install completed${RESET} "
You can’t perform that action at this time.
0 commit comments