Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
six-standard authored Aug 18, 2024
1 parent d752503 commit 3febbbd
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions packages/main/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,31 +1,25 @@
FROM node:22-alpine AS builder

RUN apk add --no-cache libc6-compat git curl unzip

RUN curl -L -o ../repo.zip https://github.com/DSM-Repo/repo/archive/main.zip && \
unzip repo.zip -d /
# Corepack 활성화 및 Yarn 설치
RUN corepack enable && corepack prepare [email protected] --activate

RUN curl -L -o ../repo.zip https://github.com/DSM-Repo/repo/archive/main.zip && \
unzip ../repo.zip -d /
WORKDIR /repo-main

RUN yarn install --immutable

ARG VITE_APP_BASE_URL
ENV VITE_APP_BASE_URL=${VITE_APP_BASE_URL}

ARG VITE_APP_URL_MAIN
ENV VITE_APP_URL_MAIN=${VITE_APP_URL_MAIN}

ARG VITE_APP_URL_STUDENT
ENV VITE_APP_URL_STUDENT=${VITE_APP_URL_STUDENT}

ARG VITE_APP_URL_TEACHER
ENV VITE_APP_URL_TEACHER=${VITE_APP_URL_TEACHER}

WORKDIR /repo-main/packages/main
RUN yarn build

FROM nginx:alpine AS runner

# Nginx 설정
RUN echo "\
server {\
Expand All @@ -36,9 +30,6 @@ server {\
try_files \$uri \$uri/ /index.html =404;\
}\
}" > /etc/nginx/conf.d/default.conf

COPY --from=builder /app/dist /usr/share/nginx/html


COPY --from=builder /repo-main/packages/main/dist /usr/share/nginx/html
EXPOSE 3000
CMD ["nginx", "-g", "daemon off;"]

0 comments on commit 3febbbd

Please sign in to comment.