mirror of
https://github.com/zadam/trilium.git
synced 2025-02-25 07:25:32 +08:00
Merge pull request #2864 from dousha/master
Fix docker data permissions
This commit is contained in:
commit
6f75f944a3
2 changed files with 11 additions and 2 deletions
|
@ -21,10 +21,15 @@ RUN set -x \
|
|||
&& npm install --production \
|
||||
&& apk del .build-dependencies
|
||||
|
||||
# Some setup tools need to be kept
|
||||
RUN apk add --no-cache su-exec
|
||||
|
||||
# Bundle app source
|
||||
COPY . .
|
||||
|
||||
USER node
|
||||
# Add application user and setup proper volume permissions
|
||||
RUN adduser -s /bin/false node; exit 0
|
||||
|
||||
# Start the application
|
||||
EXPOSE 8080
|
||||
CMD [ "node", "./src/www" ]
|
||||
CMD [ "./start-docker.sh" ]
|
||||
|
|
4
start-docker.sh
Executable file
4
start-docker.sh
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
|
||||
chown -R node:node /home/node
|
||||
su-exec node node ./src/www
|
Loading…
Reference in a new issue