mirror of
https://github.com/zadam/trilium.git
synced 2024-11-11 18:08:13 +08:00
Merge pull request #2917 from bill88t/master
Added the USER_UID & USER_GID env variables
This commit is contained in:
commit
63cabb13b6
2 changed files with 4 additions and 2 deletions
|
@ -22,7 +22,7 @@ RUN set -x \
|
|||
&& apk del .build-dependencies
|
||||
|
||||
# Some setup tools need to be kept
|
||||
RUN apk add --no-cache su-exec
|
||||
RUN apk add --no-cache su-exec shadow
|
||||
|
||||
# Bundle app source
|
||||
COPY . .
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
[[ ! -z "${USER_UID}" ]] && usermod -u ${USER_UID} node || echo "No USER_UID specified, leaving 1000"
|
||||
[[ ! -z "${USER_GID}" ]] && groupmod -g ${USER_GID} node || echo "No USER_GID specified, leaving 1000"
|
||||
|
||||
chown -R node:node /home/node
|
||||
[ -d "$TRILIUM_DATA_DIR" ] && chown -R node:node "$TRILIUM_DATA_DIR"
|
||||
su-exec node node ./src/www
|
||||
|
|
Loading…
Reference in a new issue