Skip to content

Commit 0905fcb

Browse files
committed
Adaptations for the new baseimage version 3.
1 parent 4762e66 commit 0905fcb

File tree

13 files changed

+567
-388
lines changed

13 files changed

+567
-388
lines changed

Dockerfile

Lines changed: 126 additions & 334 deletions
Large diffs are not rendered by default.

rootfs/etc/cont-init.d/90-db-upgrade.sh renamed to rootfs/etc/cont-init.d/54-db-upgrade.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
#!/usr/bin/with-contenv sh
1+
#!/bin/sh
22

33
set -e # Exit immediately if a command exits with a non-zero status.
44
set -u # Treat unset variables as an error.
55

66
log() {
77
if [ -n "${1-}" ]; then
8-
echo "[cont-init.d] $(basename $0): $*"
8+
echo "$@"
99
else
1010
while read OUTPUT; do
11-
echo "[cont-init.d] $(basename $0): $OUTPUT"
11+
echo "$OUTPUT"
1212
done
1313
fi
1414
}

rootfs/etc/cont-init.d/nginx-proxy-manager.sh renamed to rootfs/etc/cont-init.d/55-nginx-proxy-manager.sh

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
#!/usr/bin/with-contenv sh
1+
#!/bin/sh
22

33
set -e # Exit immediately if a command exits with a non-zero status.
44
set -u # Treat unset variables as an error.
55

66
log() {
7-
echo "[cont-init.d] $(basename $0): $*"
7+
echo "$@"
88
}
99

1010
# Make sure mandatory directories exist.
@@ -25,6 +25,13 @@ mkdir -p \
2525
/config/log/letsencrypt \
2626
/config/letsencrypt-workdir \
2727

28+
# Make sure directories required for nginx exist.
29+
for DIR in /var/run/nginx /var/tmp/nginx
30+
do
31+
mkdir -p "$DIR"
32+
chown app:app "$DIR"
33+
done
34+
2835
# Create symlinks for logs.
2936
[ ! -L /config/log/log ] || rm /config/log/log
3037
ln -snf log /config/logs
@@ -64,13 +71,15 @@ then
6471
fi
6572

6673
# Generate the resolvers configuration file.
67-
echo resolver "$(awk 'BEGIN{ORS=" "} $1=="nameserver" { sub(/%.*$/,"",$2); print ($2 ~ ":")? "["$2"]": $2}' /etc/resolv.conf) valid=10s;" > /config/nginx/resolvers.conf
74+
if [ "$DISABLE_IPV6" == "true" ] || [ "$DISABLE_IPV6" == "on" ] || [ "$DISABLE_IPV6" == "1" ] || [ "$DISABLE_IPV6" == "yes" ];
75+
then
76+
echo resolver "$(awk 'BEGIN{ORS=" "} $1=="nameserver" { sub(/%.*$/,"",$2); print ($2 ~ ":")? "["$2"]": $2}' /etc/resolv.conf) ipv6=off valid=10s;" > /etc/nginx/conf.d/include/resolvers.conf
77+
else
78+
echo resolver "$(awk 'BEGIN{ORS=" "} $1=="nameserver" { sub(/%.*$/,"",$2); print ($2 ~ ":")? "["$2"]": $2}' /etc/resolv.conf) valid=10s;" > /etc/nginx/conf.d/include/resolvers.conf
79+
fi
6880

69-
# Hnandle IPv6 settings.
81+
# Handle IPv6 settings.
7082
/opt/nginx-proxy-manager/bin/handle-ipv6-setting /etc/nginx/conf.d
7183
/opt/nginx-proxy-manager/bin/handle-ipv6-setting /config/nginx
7284

73-
# Take ownership of the config directory content.
74-
find /config -mindepth 1 -exec chown $USER_ID:$GROUP_ID {} \;
75-
7685
# vim:ft=sh:ts=4:sw=4:et:sts=4

rootfs/etc/services.d/app/nginx.dep

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
604800

rootfs/etc/services.d/cert_cleanup/run

Lines changed: 0 additions & 28 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/opt/nginx-proxy-manager/bin/lecleaner

rootfs/etc/services.d/default/cert_cleanup.dep

Whitespace-only changes.

rootfs/etc/services.d/nginx/respawn

Whitespace-only changes.

rootfs/etc/services.d/nginx/run

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)