-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (21 loc) · 762 Bytes
/
Dockerfile
File metadata and controls
28 lines (21 loc) · 762 Bytes
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:10
# Create app directory
# WORKDIR /usr/src/app #Currently not using this as heroku not support
ENV PRODUCTION=true
# Install app dependencies
# http://bitjudo.com/blog/2014/03/13/building-efficient-dockerfiles-node-dot-js/
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
RUN mkdir ./client
COPY ./server/package*.json ./
COPY ./client/package*.json ./client/
# If you are building your code for production
RUN npm ci --only=production
RUN cd ./client && npm ci --only=production
# Bundle app source
COPY ./server ./
COPY ./client ./client
# Build client
RUN npm install -g @angular/cli@8.3.20
RUN cd ./client && ng build --prod && cp -R dist/client ../
ENTRYPOINT [ "npm", "start" ]