fix nginx start/dep updates/merge upstream

Signed-off-by: Zoey <zoey@z0ey.de>
This commit is contained in:
Zoey 2024-10-22 07:00:17 +02:00
parent 7bf411b962
commit 90c3ec7335
5 changed files with 17 additions and 3 deletions

View file

@ -71,7 +71,7 @@ RUN apk upgrade --no-cache -a && \
sed -i "s|APPSEC_PROCESS_TIMEOUT=.*|APPSEC_PROCESS_TIMEOUT=10000|g" /src/crowdsec-nginx-bouncer/lua-mod/config_example.conf sed -i "s|APPSEC_PROCESS_TIMEOUT=.*|APPSEC_PROCESS_TIMEOUT=10000|g" /src/crowdsec-nginx-bouncer/lua-mod/config_example.conf
FROM zoeyvid/nginx-quic:349-python FROM zoeyvid/nginx-quic:350-python
SHELL ["/bin/ash", "-eo", "pipefail", "-c"] SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
COPY rootfs / COPY rootfs /
COPY --from=zoeyvid/certbot-docker:59 /usr/local /usr/local COPY --from=zoeyvid/certbot-docker:59 /usr/local /usr/local

View file

@ -100,7 +100,13 @@ const internalNginx = {
} }
}) })
.catch(() => { .catch(() => {
/* do nothing */ if (fs.existsSync('/usr/local/nginx/logs/nginx.pid') && fs.readFileSync('/usr/local/nginx/logs/nginx.pid', 'utf8').trim().length > 0) {
logger.info('Reloading Nginx');
return utils.execFile('nginx', ['-s', 'reload']);
} else {
logger.info('Starting Nginx');
return utils.execfg('nginx', ['-e', 'stderr']);
}
}); });
}); });
}, },

View file

@ -10,7 +10,7 @@
"archiver": "7.0.1", "archiver": "7.0.1",
"batchflow": "0.4.0", "batchflow": "0.4.0",
"bcrypt": "5.1.1", "bcrypt": "5.1.1",
"better-sqlite3": "11.4.0", "better-sqlite3": "11.5.0",
"body-parser": "2.0.1", "body-parser": "2.0.1",
"compression": "1.7.4", "compression": "1.7.4",
"express": "4.21.1", "express": "4.21.1",

View file

@ -52,6 +52,8 @@ services:
# - "PHP83=true" # Activate PHP83, default false # - "PHP83=true" # Activate PHP83, default false
# - "PHP83_APKS=php83-curl php83-openssl" # Add php extensions, see available packages here: https://pkgs.alpinelinux.org/packages?branch=v3.20&repo=community&arch=x86_64&name=php83-*, default none, requires PHP83 # - "PHP83_APKS=php83-curl php83-openssl" # Add php extensions, see available packages here: https://pkgs.alpinelinux.org/packages?branch=v3.20&repo=community&arch=x86_64&name=php83-*, default none, requires PHP83
# - "PHP_APKS=php-pecl-apcu php-pecl-redis" # Add php extensions, see available packages here: https://pkgs.alpinelinux.org/packages?branch=v3.20&repo=community&arch=x86_64&name=php-*, default none, requires PHP82 and/or PHP83, not recommended, please use PHP82_APKS or PHP83_APKS # - "PHP_APKS=php-pecl-apcu php-pecl-redis" # Add php extensions, see available packages here: https://pkgs.alpinelinux.org/packages?branch=v3.20&repo=community&arch=x86_64&name=php-*, default none, requires PHP82 and/or PHP83, not recommended, please use PHP82_APKS or PHP83_APKS
# - "INITIAL_ADMIN_EMAIL=initial-email" # email to use instead of admin@example.org on first start of NPMplus for the initial user
# - "INITIAL_ADMIN_PASSWORD=initial-password" # password to use instead of the one in the README.md on first start of NPMplus for the initial user
# This can be used with DISABLE_HTTP=true, to force HTTPS redirects for every host # This can be used with DISABLE_HTTP=true, to force HTTPS redirects for every host
# npmplus-caddy: # npmplus-caddy:

View file

@ -310,6 +310,12 @@ if [ -n "$PHP83_APKS" ] && ! echo "$PHP83_APKS" | grep -q "^[a-z0-9 _-]\+$"; the
fi fi
if [ -n "$INITIAL_ADMIN_EMAIL" ] && ! echo "$INITIAL_ADMIN_EMAIL" | grep -q "^.*@.*$"; then
echo "INITIAL_ADMIN_EMAIL needs to contains @."
sleep inf
fi
if [ -n "$NC_AIO" ] && ! echo "$NC_AIO" | grep -q "^true$\|^false$"; then if [ -n "$NC_AIO" ] && ! echo "$NC_AIO" | grep -q "^true$\|^false$"; then
echo "NC_AIO needs to be true or false." echo "NC_AIO needs to be true or false."
sleep inf sleep inf