forked from cityvizor/cityvizor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
28 lines (19 loc) · 746 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM node:12
WORKDIR /user/src/app
## Install and build steps separated and orderer by assumed change frequency to leverage Docker build caching
# Install server dependencies
COPY --chown=node server/package.json server/package.json
RUN cd server && npm install
# Install client dependencies
#COPY --chown=node client/package.json client/package.json
#RUN cd client && npm install
# Copy main package definition file
COPY --chown=node:node package.json package.json
# Copy server source code and build it
COPY --chown=node:node ./server ./server
RUN cd server && npm run build
# Copy client source code and build it
#COPY --chown=node:node ./client ./client
#RUN cd client && npm run build
ENV NODE_ENV="production"
CMD ["npm", "start"]