-
Notifications
You must be signed in to change notification settings - Fork 56
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (25 loc) · 753 Bytes
/
Dockerfile
File metadata and controls
34 lines (25 loc) · 753 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
29
30
31
32
33
34
FROM node:16.7.0
# Create a /diffy directory that will contain the application's code
RUN mkdir -p /diffy/backend
RUN mkdir -p /diffy/frontend
RUN npm install -g typescript@4.3.5 --legacy-peer-deps
# Angular stuff (cli and dev)
RUN npm install -g @angular/cli@12.2.2 --legacy-peer-deps
COPY ./models/ /diffy/models/
COPY ./backend/ /diffy/backend/
COPY ./frontend/ /diffy/frontend/
# Models
WORKDIR /diffy/models
RUN npm install
RUN npm run-script build
# Frontend
WORKDIR /diffy/frontend
RUN npm install --legacy-peer-deps
RUN npm run-script build
# Backend
WORKDIR /diffy/backend
RUN npm install
RUN npm run-script build
# By default expose port 3000 and run `node /diffy/src/app.js` when executing the image
EXPOSE 3000
CMD ["npm", "start"]