Skip to content

Commit 35779b1

Browse files
committed
Updated build to work with crowdsec bouncer correctly.
1 parent a39db93 commit 35779b1

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,4 +154,4 @@ LABEL \
154154
org.label-schema.description="Docker container for Nginx Proxy Manager" \
155155
org.label-schema.version="${DOCKER_IMAGE_VERSION:-unknown}" \
156156
org.label-schema.vcs-url="https://github.com/jlesage/docker-nginx-proxy-manager" \
157-
org.label-schema.schema-version="1.0"
157+
org.label-schema.schema-version="1.0"

src/cs-openresty-bouncer/build.sh

100644100755
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ fi
2323
apk --no-cache add \
2424
build-base \
2525
gettext \
26+
curl \
2627
bash \
2728

2829
#
@@ -35,4 +36,4 @@ curl -# -L "${CROWDSEC_OPENRESTY_BOUNCER_URL}" | tar xz --strip 1 -C /tmp/crowds
3536
log "Deploy Crowdsec Openresty Bouncer..."
3637
cd /tmp/crowdsec-openresty-bouncer
3738
bash ./install.sh --NGINX_CONF_DIR=${ROOTFS}/etc/nginx/conf.d --LIB_PATH=${ROOTFS}/var/lib/nginx/lualib --CONFIG_PATH=${ROOTFS}/defaults/crowdsec/ --DATA_PATH=${ROOTFS}/defaults/crowdsec/ --SSL_CERTS_PATH=/etc/ssl/certs/ca-cert-GTS_Root_R1.pem --docker
38-
sed-patch 's|ENABLED=.*|ENABLED=false|' ${ROOTFS}/defaults/crowdsec/crowdsec-openresty-bouncer.conf
39+
sed -i 's|ENABLED=.*|ENABLED=false|' ${ROOTFS}/defaults/crowdsec/crowdsec-openresty-bouncer.conf

src/openresty/build.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ log "Downloading libmaxminddb..."
7272
mkdir /tmp/libmaxminddb
7373
curl -# -L -f ${LIBMAXMINDDB_URL} | tar xz --strip 1 -C /tmp/libmaxminddb
7474

75+
76+
7577
#
7678
# Compile.
7779
#
@@ -180,6 +182,9 @@ make -C /tmp/openresty -j$(nproc)
180182
log "Installing OpenResty..."
181183
make DESTDIR=/tmp/openresty-install -C /tmp/openresty install
182184

185+
#Install lua-resty-http required for Crowdsec OpenResty Bouncer
186+
/tmp/openresty-install/var/lib/nginx/bin/opm --install-dir="/tmp/openresty-install/var/lib/nginx/site/" get pintsized/lua-resty-http
187+
183188
rm -r \
184189
/tmp/openresty-install/etc/nginx/*.default \
185190
/tmp/openresty-install/var/lib/nginx/bin/opm \
@@ -189,5 +194,4 @@ rm -r \
189194
/tmp/openresty-install/var/lib/nginx/bin/md2pod.pl \
190195
/tmp/openresty-install/var/lib/nginx/pod \
191196
/tmp/openresty-install/var/lib/nginx/resty.index \
192-
/tmp/openresty-install/var/lib/nginx/site \
193197
/tmp/openresty-install/var/run \

0 commit comments

Comments
 (0)