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

도커 파일 세팅

.git
*/node_modules
*/dist
*/.nyc_output
*/coverage
\ No newline at end of file
version: "3"
services:
server:
build:
context: .
dockerfile: ./server/Dockerfile
restart: unless-stopped
web:
build:
context: .
dockerfile: ./web/Dockerfile
restart: unless-stopped
FROM node:14-alpine
WORKDIR /usr
COPY common ./common
COPY server ./server
WORKDIR /usr/common
RUN yarn install
WORKDIR /usr/server
RUN yarn install
RUN yarn build
EXPOSE 3000
CMD [ "node", "dist/server/index.js" ]
FROM node:14-alpine as build
WORKDIR /usr
COPY common ./common
COPY web ./web
WORKDIR /usr/common
RUN yarn install
WORKDIR /usr/web
RUN yarn install
RUN yarn build
FROM nginx:latest
COPY web/default.conf /etc/nginx/conf.d/default.conf
COPY --from=build /usr/web/build /usr/web/build
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
\ No newline at end of file
server {
listen 80;
location / {
root /usr/web/build;
index index.html;
try_files $uri $uri/ /index.html;
}
}
\ No newline at end of file