Skip to content

Commit 87b6054

Browse files
authored
Merge pull request #426 from TripInfoWeb/dev_fsd_refactoring
Refactor: 프론트엔드 코드 리팩토링 2
2 parents 9cda3e9 + 048a95c commit 87b6054

File tree

831 files changed

+16856
-22962
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

831 files changed

+16856
-22962
lines changed

.dockerignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# 의존성 파일
2+
node_modules
3+
4+
# Git 관련 파일
5+
.git
6+
.gitignore
7+
.github
8+
9+
# Next.js 빌드 결과물
10+
.next
11+
12+
.eslintrc.json
13+
.prettierrc.json
14+
LICENSE
15+
README.md
16+
build.sh
17+
Dockerfile
18+
.dockerignore

.eslintrc.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
{
2-
"extends": "next/core-web-vitals",
2+
"extends": ["next/core-web-vitals"],
3+
"plugins": ["@typescript-eslint"],
34
"rules": {
45
"semi": "error",
56
"quotes": "error",
67
"jsx-quotes": "error",
8+
// "@typescript-eslint/no-unused-vars": "error",
79
"indent": [
810
"error",
911
2,

.github/pull_request_template.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,22 @@
77

88
## ☑️ 개발 유형
99

10-
- [x] Front-end
10+
- [ ] Front-end
11+
- [ ] Back-end
1112

1213
## ✔️ PR 유형
1314

14-
- [ ] 새로운 기능 추가
15-
- [ ] 버그 수정
16-
- [ ] CSS 등 사용자 UI 디자인 변경
17-
- [ ] 기존 기능에 영향을 주지 않는 변경사항 (Ex. 오타 수정, 탭 사이즈 변경, 변수명 변경, 코드 리팩토링 등)
18-
- [ ] 주석 관련 작업
19-
- [ ] 문서 관련 작업
20-
- [ ] 테스트 추가 혹은 테스트 리팩토링
21-
- [ ] 빌드 부분 혹은 패키지 매니저 수정
22-
- [ ] 파일 혹은 폴더명 수정
23-
- [ ] 파일 혹은 폴더 삭제
15+
- [ ] Feat: 새로운 기능 추가
16+
- [ ] Fix: 버그 수정
17+
- [ ] Design: CSS 등 사용자 UI 디자인 변경
18+
- [ ] Refactor: 기존 기능에 영향을 주지 않는 변경사항 (Ex. 오타 수정, 탭 사이즈 변경, 변수명 변경, 코드 리팩토링 등)
19+
- [ ] Comment: 주석 관련 작업
20+
- [ ] Docs: 문서 관련 작업
21+
- [ ] Test: 테스트 추가 혹은 테스트 리팩토링
22+
- [ ] Chore: 빌드 부분 혹은 패키지 매니저 수정
23+
- [ ] Rename: 파일 혹은 폴더명 수정
24+
- [ ] Remove: 파일 혹은 폴더 삭제
25+
- [ ] Release: 배포 관련 작업
2426

2527
## 📝 작업 내용
2628

@@ -31,6 +33,6 @@
3133

3234
## #️⃣ Related Issue
3335

34-
해당 Pull Request과 관련된 Issue Link를 작성해 주세요
36+
해당 Pull Request과 관련된 Issue Link를 작성해 주세요.
3537

36-
Ex. #123
38+
Ex. close #123

Dockerfile

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
###############################################################################################################
2+
# #
3+
# Notice: 해당 Dockerfile을 사용하기 위해선 먼저 next.config.mjs 파일에서 output이 "standalone"으로 설정되어야 합니다. #
4+
# #
5+
# 명령어: docker build -t solitour-frontend:v2.0.0 . #
6+
# #
7+
###############################################################################################################
8+
9+
# 1. 빌드 단계
10+
# 생성할 Docker 이미지의 베이스가 되는 이미지를 지정합니다.
11+
FROM node:20-alpine AS build
12+
13+
# 1-1. 작업 디렉토리 설정
14+
# 애플리케이션 파일을 저장하고 실행할 기본 작업 디렉토리를 지정합니다.
15+
# /app 디렉토리가 자동으로 생성되며, 이후의 모든 명령어가 이 디렉토리에서 실행됩니다.
16+
WORKDIR /app
17+
18+
# 1-2. 의존성 파일 복사
19+
COPY package.json package-lock.json ./
20+
21+
# 1-3. 의존성 설치
22+
# 컨테이너 안에서 명령어를 실행하고 이미지를 빌드합니다.
23+
RUN npm install
24+
25+
# 1-4. 애플리케이션 코드 복사
26+
# 현재 디렉토리의 모든 파일을 /app 디렉토리로 복사합니다.
27+
COPY . .
28+
29+
# 1-5. 애플리케이션 빌드
30+
RUN npm run build
31+
32+
# 2. 런타임 단계
33+
FROM node:20-alpine
34+
35+
# 2-1. 빌드 결과물과 필요한 파일만 복사
36+
WORKDIR /app
37+
COPY --from=build /app/.next/standalone ./
38+
COPY --from=build /app/.next/static ./.next/static
39+
COPY --from=build /app/public ./public
40+
41+
# 2-2. 포트 설정
42+
# 컨테이너가 사용하는 포트를 명시적으로 지정하는 명령어로, 호스트와 통신할 포트를 설정합니다.
43+
EXPOSE 3000
44+
45+
# 2-3. 애플리케이션 실행
46+
# 컨테이너가 시작될 때 실행할 기본 명령어를 지정합니다.
47+
# CMD는 Dockerfile에서 한 번만 사용할 수 있습니다.
48+
CMD [ "node", "server.js" ]

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@
44

55
> 배포 링크 <br/> **https://www.solitourist.com**
66
7-
<br/>
7+
<br />
88

99
<div align="center">
10-
11-
[![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2FTripInfoWeb%2Fsolitour-frontend&count_bg=%2379C83D&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=hits&edge_flat=false)](https://hits.seeyoufarm.com)
12-
10+
<a href="https://github.com/TripInfoWeb/solitour-frontend/wiki" target="_blank"><img src="https://img.shields.io/badge/GitHub%20Wiki-181717?logo=github&logoColor=white"></a>
11+
<a href="https://github.com/orgs/TripInfoWeb/projects/6" target="blank"><img src="https://img.shields.io/badge/🎯Backlog%20-02B78F?logo=none&logoColor=white"></a>
1312
</div>
1413

1514
<br/>

next.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/** @type {import('next').NextConfig} */
22
const nextConfig = {
3+
// output: "standalone", // Notice: Docker 이미지를 빌드할 때 output: "standalone"으로 설정합니다. Vercel 배포 시에는 주석 처리해야 합니다.
34
reactStrictMode: true,
45
images: {
56
remotePatterns: [

0 commit comments

Comments
 (0)