File tree Expand file tree Collapse file tree 17 files changed +101
-52
lines changed Expand file tree Collapse file tree 17 files changed +101
-52
lines changed Original file line number Diff line number Diff line change 1- 2.10.2
1+ 2.10.3
Original file line number Diff line number Diff line change 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.10.2 -green.svg?style=for-the-badge">
4+ <img src="https://img.shields.io/badge/version-2.10.3 -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>
Original file line number Diff line number Diff line change @@ -10,9 +10,13 @@ ARG BUILD_VERSION
1010ARG BUILD_COMMIT
1111ARG BUILD_DATE
1212
13+ # See: https://github.com/just-containers/s6-overlay/blob/master/README.md
1314ENV SUPPRESS_NO_CONFIG_WARNING=1 \
14- S6_FIX_ATTRS_HIDDEN=1 \
1515 S6_BEHAVIOUR_IF_STAGE2_FAILS=1 \
16+ S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \
17+ S6_FIX_ATTRS_HIDDEN=1 \
18+ S6_KILL_FINISH_MAXTIME=10000 \
19+ S6_VERBOSITY=1 \
1620 NODE_ENV=production \
1721 NPM_BUILD_VERSION="${BUILD_VERSION}" \
1822 NPM_BUILD_COMMIT="${BUILD_COMMIT}" \
Original file line number Diff line number Diff line change 11FROM jc21/nginx-full:certbot-node
22LABEL maintainer="Jamie Curnow <jc@jc21.com>"
33
4- ENV S6_LOGGING=0 \
5- SUPPRESS_NO_CONFIG_WARNING=1 \
6- S6_FIX_ATTRS_HIDDEN=1
4+ # See: https://github.com/just-containers/s6-overlay/blob/master/README.md
5+ ENV SUPPRESS_NO_CONFIG_WARNING=1 \
6+ S6_BEHAVIOUR_IF_STAGE2_FAILS=1 \
7+ S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \
8+ S6_FIX_ATTRS_HIDDEN=1 \
9+ S6_KILL_FINISH_MAXTIME=10000 \
10+ S6_VERBOSITY=2
711
812RUN echo "fs.file-max = 65535" > /etc/sysctl.conf \
913 && apt-get update \
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ services:
3535 DB_SQLITE_FILE : ' /data/mydb.sqlite'
3636 PUID : 1000
3737 PGID : 1000
38+ DISABLE_IPV6 : ' true'
3839 volumes :
3940 - npm_data:/data
4041 expose :
Original file line number Diff line number Diff line change @@ -12,6 +12,11 @@ export CYAN BLUE YELLOW RED RESET
1212PUID=${PUID:- 0}
1313PGID=${PGID:- 0}
1414
15+ NPMUSER=npm
16+ NPMGROUP=npm
17+ NPMHOME=/tmp/npmuserhome
18+ export NPMUSER NPMGROUP NPMHOME
19+
1520if [[ " $PUID " -ne ' 0' ]] && [ " $PGID " = ' 0' ]; then
1621 # set group id to same as user id,
1722 # the user probably forgot to specify the group id and
@@ -40,3 +45,10 @@ log_fatal () {
4045 /run/s6/basedir/bin/halt
4146 exit 1
4247}
48+
49+ # param $1: group_name
50+ get_group_id () {
51+ if [ " ${1:- } " != ' ' ]; then
52+ getent group " $1 " | cut -d: -f3
53+ fi
54+ }
Original file line number Diff line number Diff line change 11# run nginx in foreground
22daemon off;
33pid /run/nginx/nginx.pid ;
4- user npmuser ;
4+ user npm ;
55
66# Set number of worker processes automatically based on number of CPU cores.
77worker_processes auto;
Original file line number Diff line number Diff line change @@ -10,12 +10,12 @@ cd /app || exit 1
1010log_info 'Starting backend ...'
1111
1212if [ "${DEVELOPMENT:-}" = 'true' ]; then
13- s6-setuidgid npmuser yarn install
14- exec s6-setuidgid npmuser bash -c ' export HOME=/tmp/npmuserhome ;node --max_old_space_size=250 --abort_on_uncaught_exception node_modules/nodemon/bin/nodemon.js'
13+ s6-setuidgid "$PUID:$PGID" yarn install
14+ exec s6-setuidgid "$PUID:$PGID" bash -c " export HOME=$NPMHOME ;node --max_old_space_size=250 --abort_on_uncaught_exception node_modules/nodemon/bin/nodemon.js"
1515else
1616 while :
1717 do
18- s6-setuidgid npmuser bash -c ' export HOME=/tmp/npmuserhome ;node --abort_on_uncaught_exception --max_old_space_size=250 index.js'
18+ s6-setuidgid "$PUID:$PGID" bash -c " export HOME=$NPMHOME ;node --abort_on_uncaught_exception --max_old_space_size=250 index.js"
1919 sleep 1
2020 done
2121fi
Original file line number Diff line number Diff line change 88if [ "$DEVELOPMENT" = 'true' ]; then
99 . /bin/common.sh
1010 cd /app/frontend || exit 1
11- HOME=/tmp/npmuserhome
11+ HOME=$NPMHOME
1212 export HOME
1313 mkdir -p /app/frontend/dist
1414 chown -R "$PUID:$PGID" /app/frontend/dist
1515
1616 log_info 'Starting frontend ...'
17- s6-setuidgid npmuser yarn install
18- exec s6-setuidgid npmuser yarn watch
17+ s6-setuidgid "$PUID:$PGID" yarn install
18+ exec s6-setuidgid "$PUID:$PGID" yarn watch
1919else
2020 exit 0
2121fi
Original file line number Diff line number Diff line change 66. /bin/common.sh
77
88log_info 'Starting nginx ...'
9- exec s6-setuidgid npmuser nginx
9+ exec s6-setuidgid "$PUID:$PGID" nginx
You can’t perform that action at this time.
0 commit comments