Skip to content

Commit 669c4ea

Browse files
authored
Merge pull request #1089 from dataquest-dev/palo-docker-permissions-fix
ensure that node has proper permissions
2 parents 65048cc + cc7c8c3 commit 669c4ea

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Dockerfile.dist

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ COPY --chown=node:node --from=build /app/dist /app/dist
2727
COPY --chown=node:node config /app/config
2828
COPY --chown=node:node docker/dspace-ui.json /app/dspace-ui.json
2929

30-
# user node does not have root privileges so we need to ensure that
31-
# necessary files exist and node has sufficient access rights
30+
WORKDIR /app
31+
USER node
32+
33+
# Ensure necessary files exist and have proper permissions
3234
RUN mkdir -p /app/dist/browser/assets \
3335
&& touch /app/dist/browser/assets/config.json \
3436
&& find /app/dist/browser/assets -type d -exec chmod 750 {} \; \
3537
&& find /app/dist/browser/assets -type f -exec chmod 640 {} \;
3638

37-
WORKDIR /app
38-
USER node
3939
ENV NODE_ENV=production
4040
EXPOSE 4000
4141
CMD ["pm2-runtime", "start", "dspace-ui.json", "--json"]

0 commit comments

Comments
 (0)