-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathDockerfile
39 lines (25 loc) · 787 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
29
30
31
32
33
34
35
36
37
38
39
FROM node:latest as builder
WORKDIR /usr/src/app
ADD muino-angular/ /usr/src/app
RUN npm install --production
RUN npm rebuild node-sass
RUN npm install --save [email protected]
RUN npm install -g @angular/cli
RUN npm run build
FROM mhart/alpine-node:latest
RUN apk update
WORKDIR /usr/src/app
ADD muino-smarthome-api/ /usr/src/app
RUN apk --no-cache add --virtual builds-deps build-base python
RUN npm config set python /usr/bin/python
RUN npm i -g npm
RUN mkdir dist/ || true
COPY --from=builder /usr/src/app/dist/ /usr/src/app/dist/
RUN ls -la /usr/src/app/dist/
RUN npm install --production
RUN npm rebuild bcrypt --build-from-source || true
# RUN npm i -g pm2
RUN apk del builds-deps
EXPOSE 80
# CMD ["pm2", "start", "processes.json", "--no-daemon"]
CMD ["node", "server"]