-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat : 프론트 github 액션 및 도커파일 생성 * feat : 프론트 배포 도커파일 작성 * feat : 프론트 ci/cd 깃허브 액션 추가
- Loading branch information
1 parent
dbf3cbd
commit 24f7378
Showing
3 changed files
with
76 additions
and
64 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
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# 첫 번째 단계: 빌드 환경 구축 | ||
FROM node:lts-alpine as build-stage | ||
|
||
WORKDIR /app | ||
|
||
# 의존성 파일 복사 및 설치 | ||
COPY package*.json ./ | ||
RUN npm install | ||
|
||
# 소스 코드 복사 | ||
COPY . . | ||
|
||
# 애플리케이션 빌드 | ||
RUN npm run build | ||
|
||
# 두 번째 단계: Nginx를 사용하여 애플리케이션 서빙 | ||
FROM nginx:stable-alpine as production-stage | ||
|
||
# 빌드된 파일을 Nginx 서버로 복사 | ||
COPY --from=build-stage /app/dist /usr/share/nginx/html | ||
|
||
# Nginx 설정 파일 복사 (선택 사항) | ||
# COPY nginx.conf /etc/nginx/conf.d/default.conf | ||
|
||
# 80 포트 노출 | ||
EXPOSE 80 | ||
|
||
# Nginx 실행 | ||
CMD ["nginx", "-g", "daemon off;"] |
This file was deleted.
Oops, something went wrong.