diff --git a/Dockerfile b/Dockerfile index 3978fcf16..a0dd5f892 100644 --- a/Dockerfile +++ b/Dockerfile @@ -73,20 +73,34 @@ RUN apk upgrade --no-cache -a && \ FROM zoeyvid/nginx-quic:350-python SHELL ["/bin/ash", "-eo", "pipefail", "-c"] -COPY rootfs / -COPY --from=zoeyvid/certbot-docker:59 /usr/local /usr/local -COPY --from=zoeyvid/curl-quic:423 /usr/local/bin/curl /usr/local/bin/curl + +# until https://github.com/certbot/certbot/issues/9967 is closed +ENV PYTHONWARNINGS=ignore + +COPY rootfs / +COPY --from=zoeyvid/certbot-docker:60 /usr/local /usr/local +COPY --from=zoeyvid/curl-quic:423 /usr/local/bin/curl /usr/local/bin/curl + +COPY --from=strip-backend /app /app +COPY --from=frontend /app/dist /html/frontend + +COPY --from=crowdsec /src/crowdsec-nginx-bouncer/lua-mod/lib/plugins /usr/local/nginx/lib/lua/plugins +COPY --from=crowdsec /src/crowdsec-nginx-bouncer/lua-mod/lib/crowdsec.lua /usr/local/nginx/lib/lua/crowdsec.lua +COPY --from=crowdsec /src/crowdsec-nginx-bouncer/lua-mod/templates/ban.html /usr/local/nginx/conf/conf.d/include/ban.html +COPY --from=crowdsec /src/crowdsec-nginx-bouncer/lua-mod/templates/captcha.html /usr/local/nginx/conf/conf.d/include/captcha.html +COPY --from=crowdsec /src/crowdsec-nginx-bouncer/lua-mod/config_example.conf /usr/local/nginx/conf/conf.d/include/crowdsec.conf +COPY --from=crowdsec /src/crowdsec-nginx-bouncer/nginx/crowdsec_nginx.conf /usr/local/nginx/conf/conf.d/include/crowdsec_nginx.conf ARG CRS_VER=v4.8.0 RUN apk upgrade --no-cache -a && \ apk add --no-cache ca-certificates tzdata tini \ - nodejs \ - bash nano \ - logrotate \ + bash nano nodejs \ + logrotate goaccess fcgi \ lua5.1-lzlib lua5.1-socket \ coreutils grep findutils jq shadow su-exec \ luarocks5.1 lua5.1-dev lua5.1-sec build-base git yarn && \ - curl https://raw.githubusercontent.com/acmesh-official/acme.sh/master/acme.sh | sh -s -- --install-online --home /usr/local/acme.sh --nocron && \ +# curl https://raw.githubusercontent.com/acmesh-official/acme.sh/master/acme.sh | sh -s -- --install-online --home /usr/local/acme.sh --nocron && \ +# ln -s /usr/local/acme.sh/acme.sh /usr/local/bin/acme.sh && \ curl https://raw.githubusercontent.com/tomwassenberg/certbot-ocsp-fetcher/refs/heads/main/certbot-ocsp-fetcher -o /usr/local/bin/certbot-ocsp-fetcher.sh && \ chmod +x /usr/local/bin/certbot-ocsp-fetcher.sh && \ git clone https://github.com/coreruleset/coreruleset --branch "$CRS_VER" /tmp/coreruleset && \ @@ -100,18 +114,7 @@ RUN apk upgrade --no-cache -a && \ luarocks-5.1 install lua-resty-string && \ luarocks-5.1 install lua-resty-openssl && \ yarn global add nginxbeautifier && \ - apk del --no-cache luarocks5.1 lua5.1-dev lua5.1-sec build-base git yarn - -COPY --from=strip-backend /app /app -COPY --from=frontend /app/dist /html/frontend -COPY --from=crowdsec /src/crowdsec-nginx-bouncer/lua-mod/lib/plugins /usr/local/nginx/lib/lua/plugins -COPY --from=crowdsec /src/crowdsec-nginx-bouncer/lua-mod/lib/crowdsec.lua /usr/local/nginx/lib/lua/crowdsec.lua -COPY --from=crowdsec /src/crowdsec-nginx-bouncer/lua-mod/templates/ban.html /usr/local/nginx/conf/conf.d/include/ban.html -COPY --from=crowdsec /src/crowdsec-nginx-bouncer/lua-mod/templates/captcha.html /usr/local/nginx/conf/conf.d/include/captcha.html -COPY --from=crowdsec /src/crowdsec-nginx-bouncer/lua-mod/config_example.conf /usr/local/nginx/conf/conf.d/include/crowdsec.conf -COPY --from=crowdsec /src/crowdsec-nginx-bouncer/nginx/crowdsec_nginx.conf /usr/local/nginx/conf/conf.d/include/crowdsec_nginx.conf - -RUN ln -s /usr/local/acme.sh/acme.sh /usr/local/bin/acme.sh && \ + apk del --no-cache luarocks5.1 lua5.1-dev lua5.1-sec build-base git yarn && \ ln -s /app/password-reset.js /usr/local/bin/password-reset.js && \ ln -s /app/sqlite-vaccum.js /usr/local/bin/sqlite-vaccum.js && \ ln -s /app/index.js /usr/local/bin/index.js @@ -121,9 +124,6 @@ ENV NODE_ENV=production \ NODE_CONFIG_DIR=/data/etc/npm \ DB_SQLITE_FILE=/data/etc/npm/database.sqlite -# until https://github.com/certbot/certbot/issues/9967 is closed -ENV PYTHONWARNINGS=ignore - ENV ACME_SERVER="https://acme-v02.api.letsencrypt.org/directory" \ PUID=0 \ PGID=0 \ diff --git a/backend/package.json b/backend/package.json index 445c07bc1..927b94a5b 100644 --- a/backend/package.json +++ b/backend/package.json @@ -11,8 +11,8 @@ "batchflow": "0.4.0", "bcrypt": "5.1.1", "better-sqlite3": "11.5.0", - "body-parser": "2.0.1", - "compression": "1.7.4", + "body-parser": "2.0.2", + "compression": "1.7.5", "express": "4.21.1", "express-fileupload": "1.5.1", "gravatar": "1.8.2", @@ -31,8 +31,8 @@ "license": "MIT", "devDependencies": { "@apidevtools/swagger-parser": "10.1.0", - "@eslint/js": "9.13.0", - "eslint": "9.13.0", + "@eslint/js": "9.14.0", + "eslint": "9.14.0", "eslint-config-prettier": "9.1.0", "eslint-plugin-prettier": "5.2.1", "globals": "15.11.0", diff --git a/frontend/js/app/nginx/dead/form.ejs b/frontend/js/app/nginx/dead/form.ejs index 168248de1..78ce92946 100644 --- a/frontend/js/app/nginx/dead/form.ejs +++ b/frontend/js/app/nginx/dead/form.ejs @@ -8,7 +8,7 @@