Merge pull request #2864 from dousha/master

Fix docker data permissions
This commit is contained in:
zadam 2022-05-21 22:55:59 +02:00 committed by GitHub
commit 6f75f944a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View file

@ -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
View file

@ -0,0 +1,4 @@
#!/bin/sh
chown -R node:node /home/node
su-exec node node ./src/www