Skip to content

Commit 5ac9dc0

Browse files
committed
Attempt to set HOME for npmuser backend
1 parent 9a799d5 commit 5ac9dc0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docker/rootfs/etc/s6-overlay/s6-rc.d/backend/run

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ if [ "$DEVELOPMENT" == "true" ]; then
1111
cd /app || exit 1
1212
# If yarn install fails: add --verbose --network-concurrency 1
1313
s6-setuidgid npmuser yarn install
14-
exec s6-setuidgid npmuser node --max_old_space_size=250 --abort_on_uncaught_exception node_modules/nodemon/bin/nodemon.js
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'
1515
else
1616
cd /app || exit 1
1717
while :
1818
do
19-
s6-setuidgid npmuser node --abort_on_uncaught_exception --max_old_space_size=250 index.js
19+
s6-setuidgid npmuser bash -c 'export HOME=/tmp/npmuserhome;node --abort_on_uncaught_exception --max_old_space_size=250 index.js'
2020
sleep 1
2121
done
2222
fi

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ PGID=${PGID:-911}
1010
log_info 'Creating npmuser ...'
1111

1212
groupmod -g 1000 users || exit 1
13-
useradd -u "${PUID}" -U -d /data -s /bin/false npmuser || exit 1
13+
useradd -u "${PUID}" -U -d /tmp/npmuserhome -s /bin/false npmuser || exit 1
1414
usermod -G users npmuser || exit 1
1515
groupmod -o -g "$PGID" npmuser || exit 1
1616
# Home for npmuser

0 commit comments

Comments
 (0)