Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
dutexion committed Feb 28, 2024
1 parent eda592b commit dbcbe6e
Showing 1 changed file with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions packages/user/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,34 @@
# 가져올 이미지를 정의
FROM node:18.12.0
FROM node:18.12.0 AS builder

# 경로 설정하기
WORKDIR /app

RUN apk add --no-cache libc6-compat

COPY manifests ./

RUN yarn install
RUN yarn install --immutable

COPY packs ./

COPY . .
RUN yarn workspace @merge/user build

# 실행 단계
FROM nginx:alpine AS runner

RUN echo "\
server {\
listen 3000;\
location / {\
root /usr/share/nginx/html;\
index index.html index.htm;\
try_files \$uri \$uri/ /index.html =404;\
}\
}" > /etc/nginx/conf.d/default.conf

ARG BASE_URL
ENV VITE_SERVER_BASE_URL $BASE_URL
COPY --from=builder /app/packages/user/dist /usr/share/nginx/html

# 3000포트 열기
EXPOSE 3000

CMD ["yarn", "dev"]
# Nginx 시작
CMD ["nginx", "-g", "daemon off;"]

0 comments on commit dbcbe6e

Please sign in to comment.