Skip to content

Commit 87adde3

Browse files
committed
Updated Nginx Proxy Manager to version 2.10.4.
1 parent cbf6643 commit 87adde3

File tree

4 files changed

+38
-11
lines changed

4 files changed

+38
-11
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ARG DOCKER_IMAGE_VERSION=
99

1010
# Define software versions.
1111
ARG OPENRESTY_VERSION=1.19.9.1
12-
ARG NGINX_PROXY_MANAGER_VERSION=2.9.22
12+
ARG NGINX_PROXY_MANAGER_VERSION=2.10.4
1313
ARG NGINX_HTTP_GEOIP2_MODULE_VERSION=3.3
1414
ARG LIBMAXMINDDB_VERSION=1.5.0
1515
ARG BCRYPT_TOOL_VERSION=1.1.2
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/bash
2+
3+
# This command reads the `DISABLE_IPV6` env var and will either enable
4+
# or disable ipv6 in all nginx configs based on this setting.
5+
6+
# Lowercase
7+
DISABLE_IPV6=$(echo "${DISABLE_IPV6:-}" | tr '[:upper:]' '[:lower:]')
8+
9+
FOLDER=$1
10+
if [ "$FOLDER" == "" ]; then
11+
echo "$0 requires a absolute folder path as the first argument!"
12+
exit 1
13+
fi
14+
15+
FILES=$(find "$FOLDER" -type f -name "*.conf")
16+
SED_REGEX=
17+
18+
if [ "$DISABLE_IPV6" == "true" ] || [ "$DISABLE_IPV6" == "on" ] || [ "$DISABLE_IPV6" == "1" ] || [ "$DISABLE_IPV6" == "yes" ]; then
19+
# IPV6 is disabled
20+
echo "Disabling IPV6 in hosts in: $1"
21+
SED_REGEX='s/^([^#]*)listen \[::\]/\1#listen [::]/g'
22+
else
23+
# IPV6 is enabled
24+
echo "Enabling IPV6 in hosts in: $1"
25+
SED_REGEX='s/^(\s*)#listen \[::\]/\1listen [::]/g'
26+
fi
27+
28+
for FILE in $FILES
29+
do
30+
echo "- ${FILE}"
31+
echo "$(sed -E "$SED_REGEX" "$FILE")" > $FILE
32+
done

src/nginx-proxy-manager/build.sh

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ cp -rv /app/frontend/dist $ROOTFS/opt/nginx-proxy-manager/frontend
122122
cp -rv /app/global $ROOTFS/opt/nginx-proxy-manager/global
123123

124124
mkdir $ROOTFS/opt/nginx-proxy-manager/bin
125-
cp -rv /tmp/nginx-proxy-manager/docker/rootfs/bin/handle-ipv6-setting $ROOTFS/opt/nginx-proxy-manager/bin/
126125
cp -rv /tmp/nginx-proxy-manager/docker/rootfs/etc/nginx $ROOTFS/etc/
127126
cp -rv /tmp/nginx-proxy-manager/docker/rootfs/var/www $ROOTFS/var/
128127
cp -rv /tmp/nginx-proxy-manager/docker/rootfs/etc/letsencrypt.ini $ROOTFS/etc/
@@ -157,7 +156,7 @@ sed -i 's|:443;|:4443;|' $ROOTFS/opt/nginx-proxy-manager/templates/_listen.conf
157156
sed -i 's|-g "error_log off;"||' $ROOTFS/opt/nginx-proxy-manager/internal/nginx.js
158157

159158
# Remove the `user` directive, since we want nginx to run as non-root.
160-
sed -i 's|user root;|#user root;|' $ROOTFS/etc/nginx/nginx.conf
159+
sed -i 's|user npm;|#user npm;|' $ROOTFS/etc/nginx/nginx.conf
161160

162161
# Change client_body_temp_path.
163162
sed -i 's|/tmp/nginx/body|/var/tmp/nginx/body|' $ROOTFS/etc/nginx/nginx.conf
@@ -190,10 +189,6 @@ ln -s /config/production.json $ROOTFS/opt/nginx-proxy-manager/config/production.
190189
# Make sure letsencrypt certificates are stored in persistent volume.
191190
ln -s /config/letsencrypt $ROOTFS/etc/letsencrypt
192191

193-
# Make sure some default certbot directories are stored in persistent volume.
194-
ln -s /config/letsencrypt-workdir $ROOTFS/var/lib/letsencrypt
195-
ln -s /config/log/letsencrypt $ROOTFS/var/log/letsencrypt
196-
197192
# Cleanup.
198193
find $ROOTFS/opt/nginx-proxy-manager -name "*.h" -delete
199194
find $ROOTFS/opt/nginx-proxy-manager -name "*.cc" -delete

src/nginx-proxy-manager/pip-install.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ index da104a2..730d826 100644
66
const escapedCredentials = certificate.meta.dns_provider_credentials.replaceAll('\'', '\\\'').replaceAll('\\', '\\\\');
77
const credentialsCmd = 'mkdir -p /etc/letsencrypt/credentials 2> /dev/null; echo \'' + escapedCredentials + '\' > \'' + credentialsLocation + '\' && chmod 600 \'' + credentialsLocation + '\'';
88
// we call `. /opt/certbot/bin/activate` (`.` is alternative to `source` in dash) to access certbot venv
9-
- let prepareCmd = '. /opt/certbot/bin/activate && pip install ' + dns_plugin.package_name + (dns_plugin.version_requirement || '') + ' ' + dns_plugin.dependencies + ' && deactivate';
10-
+ let prepareCmd = 'pip install ' + dns_plugin.package_name + (dns_plugin.version_requirement || '') + ' ' + dns_plugin.dependencies;
9+
- const prepareCmd = '. /opt/certbot/bin/activate && pip install --no-cache-dir ' + dns_plugin.package_name + (dns_plugin.version_requirement || '') + ' ' + dns_plugin.dependencies + ' && deactivate';
10+
+ const prepareCmd = 'pip install --no-cache-dir ' + dns_plugin.package_name + (dns_plugin.version_requirement || '') + ' ' + dns_plugin.dependencies;
1111

1212
// Whether the plugin has a --<name>-credentials argument
1313
const hasConfigArg = certificate.meta.dns_provider !== 'route53';
@@ -19,8 +19,8 @@ index a4b51c9..6d3d3e3 100644
1919
});
2020

2121
if (plugins.length) {
22-
- const install_cmd = '. /opt/certbot/bin/activate && pip install ' + plugins.join(' ') + ' && deactivate';
23-
+ const install_cmd = 'pip install ' + plugins.join(' ');
22+
- const install_cmd = '. /opt/certbot/bin/activate && pip install --no-cache-dir ' + plugins.join(' ') + ' && deactivate';
23+
+ const install_cmd = 'pip install --no-cache-dir ' + plugins.join(' ');
2424
promises.push(utils.exec(install_cmd));
2525
}
2626

0 commit comments

Comments
 (0)