강동현
Builds for 1 pipeline passed in 11 minutes 35 seconds

도커 파일 세팅

1 +.git
2 +*/node_modules
3 +*/dist
4 +*/.nyc_output
5 +*/coverage
...\ No newline at end of file ...\ No newline at end of file
1 +version: "3"
2 +
3 +services:
4 + server:
5 + build:
6 + context: .
7 + dockerfile: ./server/Dockerfile
8 + restart: unless-stopped
9 +
10 + web:
11 + build:
12 + context: .
13 + dockerfile: ./web/Dockerfile
14 + restart: unless-stopped
1 +FROM node:14-alpine
2 +
3 +WORKDIR /usr
4 +
5 +COPY common ./common
6 +COPY server ./server
7 +
8 +WORKDIR /usr/common
9 +
10 +RUN yarn install
11 +
12 +WORKDIR /usr/server
13 +
14 +RUN yarn install
15 +RUN yarn build
16 +
17 +EXPOSE 3000
18 +
19 +CMD [ "node", "dist/server/index.js" ]
1 +FROM node:14-alpine as build
2 +
3 +WORKDIR /usr
4 +
5 +COPY common ./common
6 +COPY web ./web
7 +
8 +WORKDIR /usr/common
9 +
10 +RUN yarn install
11 +
12 +WORKDIR /usr/web
13 +
14 +RUN yarn install
15 +RUN yarn build
16 +
17 +FROM nginx:latest
18 +
19 +COPY web/default.conf /etc/nginx/conf.d/default.conf
20 +COPY --from=build /usr/web/build /usr/web/build
21 +
22 +EXPOSE 80
23 +
24 +CMD ["nginx", "-g", "daemon off;"]
...\ No newline at end of file ...\ No newline at end of file
1 +server {
2 + listen 80;
3 + location / {
4 + root /usr/web/build;
5 + index index.html;
6 + try_files $uri $uri/ /index.html;
7 + }
8 +}
...\ No newline at end of file ...\ No newline at end of file