-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d752503
commit 3febbbd
Showing
1 changed file
with
5 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 {\ | ||
|
@@ -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;"] |