Skip to content

Commit 2926844

Browse files
authored
Merge pull request #2738 from NginxProxyManager/develop
v2.9.22
2 parents 095bc8f + c1960f3 commit 2926844

File tree

8 files changed

+32
-45
lines changed

8 files changed

+32
-45
lines changed

.version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.9.21
1+
2.9.22

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<p align="center">
22
<img src="https://nginxproxymanager.com/github.png">
33
<br><br>
4-
<img src="https://img.shields.io/badge/version-2.9.19-green.svg?style=for-the-badge">
4+
<img src="https://img.shields.io/badge/version-2.9.22-green.svg?style=for-the-badge">
55
<a href="https://hub.docker.com/repository/docker/jc21/nginx-proxy-manager">
66
<img src="https://img.shields.io/docker/stars/jc21/nginx-proxy-manager.svg?style=for-the-badge">
77
</a>

docker/rootfs/etc/cont-finish.d/.gitignore

-2
This file was deleted.

docker/rootfs/etc/cont-init.d/.gitignore

-3
This file was deleted.

docker/rootfs/etc/cont-init.d/01_perms.sh

-7
This file was deleted.

docker/rootfs/etc/cont-init.d/01_s6-secret-init.sh

-29
This file was deleted.

docker/rootfs/etc/fix-attrs.d/.gitignore

-2
This file was deleted.

docker/rootfs/etc/s6-overlay/s6-rc.d/prepare/script.sh

+30
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,40 @@ else
4848
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
4949
fi
5050

51+
echo "Changing ownership of /data/logs to $(id -u):$(id -g)"
52+
chown -R "$(id -u):$(id -g)" /data/logs
53+
5154
# Handle IPV6 settings
5255
/bin/handle-ipv6-setting /etc/nginx/conf.d
5356
/bin/handle-ipv6-setting /data/nginx
5457

58+
# ref: https://github.com/linuxserver/docker-baseimage-alpine/blob/master/root/etc/cont-init.d/01-envfile
59+
60+
# in s6, environmental variables are written as text files for s6 to monitor
61+
# search through full-path filenames for files ending in "__FILE"
62+
echo "❯ Secrets-init ..."
63+
for FILENAME in $(find /var/run/s6/container_environment/ | grep "__FILE$"); do
64+
echo "[secret-init] Evaluating ${FILENAME##*/} ..."
65+
66+
# set SECRETFILE to the contents of the full-path textfile
67+
SECRETFILE=$(cat "${FILENAME}")
68+
# if SECRETFILE exists / is not null
69+
if [[ -f "${SECRETFILE}" ]]; then
70+
# strip the appended "__FILE" from environmental variable name ...
71+
STRIPFILE=$(echo "${FILENAME}" | sed "s/__FILE//g")
72+
# echo "[secret-init] Set STRIPFILE to ${STRIPFILE}" # DEBUG - rm for prod!
73+
74+
# ... and set value to contents of secretfile
75+
# since s6 uses text files, this is effectively "export ..."
76+
printf $(cat "${SECRETFILE}") > "${STRIPFILE}"
77+
# echo "[secret-init] Set ${STRIPFILE##*/} to $(cat ${STRIPFILE})" # DEBUG - rm for prod!"
78+
echo "[secret-init] Success! ${STRIPFILE##*/} set from ${FILENAME##*/}"
79+
80+
else
81+
echo "[secret-init] cannot find secret in ${FILENAME}"
82+
fi
83+
done
84+
5585
echo
5686
echo "-------------------------------------
5787
_ _ ____ __ __

0 commit comments

Comments
 (0)