Skip to content

Commit

Permalink
Change path and run as user node
Browse files Browse the repository at this point in the history
  • Loading branch information
tephenavies committed Jul 18, 2024
1 parent b49e225 commit 3641a36
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions deploy/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# Docker image for the primary terria map application server
# Intended for use only with a "context" directory created by create-docker-context.js
FROM node:16-slim

RUN mkdir -p /usr/src/app && mkdir -p /etc/config/client
WORKDIR /usr/src/app/component
COPY . /usr/src/app
RUN mkdir -p /etc/config/client

USER node
WORKDIR /usr/src/app
COPY --chown=node:node component /usr/src/app

EXPOSE 3001
ENV NODE_ENV=production
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
- name: terriamap-config-server
mountPath: /etc/config/server
- name: terriamap-config-client
mountPath: /usr/src/app/component/wwwroot/config.json
mountPath: /usr/src/app/wwwroot/config.json
subPath: config.json
volumes:
- name: terriamap-config-client
Expand Down

0 comments on commit 3641a36

Please sign in to comment.