forked from CardSorter/CardSorterClient
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
executable file
·69 lines (41 loc) · 1.04 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Stage 1 build production
FROM node:13 as builder
WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
# Build auth
# RUN mkdir auth
WORKDIR /app/auth
COPY ./auth/package.json ./
RUN npm install
COPY ./auth ./
RUN npm run build
# Build designer
WORKDIR /app
# RUN mkdir designer
WORKDIR /app/designer
COPY ./designer/package.json ./
RUN npm install
COPY ./designer ./
RUN npm run build
# Build sorter
WORKDIR /app
# RUN mkdir sorter
WORKDIR /app/sorter
COPY ./sorter/package.json ./
RUN npm install
COPY ./sorter ./
RUN npm run build
# Stage 2 serve the files
FROM nginx:1.19
# Install nano, this is for debuging
#RUN apt-get update
#RUN apt-get install nano
WORKDIR /usr/share/nginx/html
COPY --from=builder /app/auth/build ./auth
COPY --from=builder /app/designer/build ./designer
COPY --from=builder /app/sorter/build ./sort
WORKDIR /
# RUN rm /etc/nginx/conf.d/default.conf
COPY ./nginx/conf.d/ /etc/nginx/conf.d/
EXPOSE 8000 8500
CMD ["nginx", "-g", "daemon off;"]