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:
22
22
** latest**
23
23
- OpenResty
24
24
- Lua
25
+ - [ Crowdsec Openresty Bouncer] ( https://github.com/crowdsecurity/cs-openresty-bouncer )
25
26
26
27
** certbot**
27
28
- Certbot
Original file line number Diff line number Diff line change @@ -73,8 +73,10 @@ COPY --from=nginxbuilder /tmp/openresty /tmp/openresty
73
73
COPY ./scripts/install-openresty /tmp/install-openresty
74
74
75
75
ARG OPENRESTY_VERSION
76
+ ARG CROWDSEC_OPENRESTY_BOUNCER_VERSION
76
77
ENV 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}
78
80
79
81
# Install openresty, lua, then clean up file system
80
82
RUN apt-get update \
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ RESET='\E[0m'
9
9
DOCKER_IMAGE=nginxproxymanager/nginx-full
10
10
11
11
export OPENRESTY_VERSION=1.19.9.1
12
+ export CROWDSEC_OPENRESTY_BOUNCER_VERSION=0.1.1
12
13
export LUA_VERSION=5.1.5
13
14
export LUAROCKS_VERSION=3.3.1
14
15
@@ -18,6 +19,7 @@ echo -e "${BLUE}❯ ${CYAN}Building ${YELLOW}latest ${CYAN}...${RESET}"
18
19
docker build \
19
20
--pull \
20
21
--build-arg OPENRESTY_VERSION \
22
+ --build-arg CROWDSEC_OPENRESTY_BOUNCER_VERSION \
21
23
--build-arg LUA_VERSION \
22
24
--build-arg LUAROCKS_VERSION \
23
25
-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