Skip to content

Commit dcc1010

Browse files
authored
Create README.md
1 parent de96490 commit dcc1010

File tree

1 file changed

+164
-0
lines changed

1 file changed

+164
-0
lines changed

README.md

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
# UniUnity Server
2+
3+
**UniUnity** 프로젝트의 **백엔드 레포지토리**입니다.
4+
마이크로서비스 아키텍처(MSA)를 기반으로 서비스가 독립적으로 배포 및 확장 가능하도록 설계되었습니다.
5+
6+
## 🛠 Tech Stack
7+
<img src="https://skillicons.dev/icons?i=nodejs,mysql,rabbitmq,docker,kubernetes,github,gcp" height="50">
8+
9+
---
10+
11+
## 📚 목차
12+
13+
1. [프로젝트 소개](#-프로젝트-소개)
14+
2. [기술 스택](#-기술-스택)
15+
3. [팀원 소개](#-팀원-소개)
16+
4. [서비스 아키텍처](#-서비스-아키텍처)
17+
5. [레포지토리 구성](#-레포지토리-구성)
18+
6. [쿠버네티스 설정](#-쿠버네티스-설정)
19+
- Deployment
20+
- Pod Health Check
21+
- Ingress
22+
- DB(Service / PVC)
23+
- Secret
24+
7. [통신 방법](#-통신-방법)
25+
- 직접 통신
26+
- 간접 통신
27+
8. [CI/CD 파이프라인](#-cicd-파이프라인)
28+
9. [데모 영상](#-데모-영상)
29+
30+
---
31+
32+
## 📖 프로젝트 소개
33+
34+
**UniUnity**는 대학 상권 커뮤니티 서비스를 구축하기 위해 MSA(Microservices Architecture)를 적용한 프로젝트입니다.
35+
RabbitMQ를 이용한 간접 통신과 JWT 기반 직접 통신을 통해 안정적이고 확장성 있는 백엔드 시스템을 설계했습니다.
36+
37+
**주요 특징**
38+
- 서비스 단위로 분리된 MSA 구조
39+
- RabbitMQ 기반 RPC 방식 비동기 메시징
40+
- JWT 기반 인증 및 직접 통신(/auth/me)
41+
- Kubernetes 환경에서의 배포 및 확장
42+
- GitHub Actions를 이용한 CI/CD 자동화
43+
44+
---
45+
46+
## 🛠 기술 스택
47+
48+
| 구분 | 기술 |
49+
|------|------|
50+
| **Language** | Javascript |
51+
| **Framework** | Node.js, Express |
52+
| **Database** | MySQL|
53+
| **Messaging** | RabbitMQ |
54+
| **Infra** | Docker, Kubernetes(GKE), GCP |
55+
| **CI/CD** | GitHub Actions, Docker Hub |
56+
| **Auth** | JWT |
57+
| **기타** | ConfigMap, Secret, Ingress |
58+
59+
---
60+
61+
## 👤 팀원 소개
62+
63+
<div align="center">
64+
65+
| 팀원 | 담당 역할 |
66+
|------|-----------|
67+
| [pjhyun0225](https://github.com/pjhyun0225) | partner-service 담당 |
68+
| [KimGeunHye21](https://github.com/KimGeunHye21) | user-service 담당 |
69+
| [youngseoOh](https://github.com/youngseoOh) | post-reaction-service 담당 |
70+
| [chaehyeon02](https://github.com/chaehyeon02) | start-service 담당 |
71+
| [5IHYUN](https://github.com/5IHYUN) | post-service 담당 |
72+
| [JiwonLee42](https://github.com/JiwonLee42) | post-reaction-service 담당 |
73+
74+
</div>
75+
76+
---
77+
78+
## 🖥 서비스 아키텍처
79+
80+
> UniUnity 서비스 전체 구성도입니다.
81+
82+
<img width="644" height="321" alt="Image" src="https://github.com/user-attachments/assets/cc6efb72-e962-44c7-b5ab-1b8fe8cde7cd" />
83+
84+
---
85+
86+
## 🗂 레포지토리 구성
87+
88+
```plaintext
89+
unimsa/
90+
├── k8s/ # Kubernetes 관련 리소스
91+
│ ├── db/ # DB Deployment, PVC, Service
92+
│ ├── rabbitmq/ # RabbitMQ Deployment, Service
93+
│ ├── ingress/ # Ingress Controller 설정
94+
│ └── service/ # 각 서비스 Deployment, Service
95+
96+
├── service-repos/ # 개별 서비스 레포지토리
97+
│ ├── user-service/
98+
│ ├── partner-service/
99+
│ ├── start-service/
100+
│ └── post-service/
101+
102+
└── cicd/ # GitHub Actions 워크플로우
103+
104+
---
105+
## ☸️ 쿠버네티스 설정
106+
107+
### 1. Deployment
108+
- 각 서비스는 `Deployment.yaml` 기반으로 배포
109+
- `initContainer`를 활용하여 DB와 RabbitMQ 준비 여부 확인 후 서비스 실행
110+
111+
### 2. Pod Health Check
112+
- `/ready` → DB, RabbitMQ 연결 상태 확인
113+
- `/health` → 파드 정상 동작 여부 확인
114+
- `readinessProbe`, `livenessProbe` 적용
115+
116+
### 3. Ingress
117+
- **Nginx Ingress Controller** 사용
118+
- 도메인 기반 라우팅 (`uniunity.store`)
119+
- 예시: `/mainpage` → `start-service`
120+
121+
### 4. DB (Service / PVC)
122+
- MySQL DB 파드 및 PVC 구성 (1Gi)
123+
- ClusterIP 타입으로 내부 서비스에서만 접근 가능
124+
125+
### 5. Secret
126+
- 민감한 DB 접속 정보 및 RabbitMQ 계정 정보 관리
127+
- ConfigMap과 분리하여 안전한 배포 지원
128+
129+
---
130+
131+
## 🔗 통신 방법
132+
133+
### 1. 직접 통신
134+
- **JWT 기반 인증 (/auth/me)**
135+
- 브라우저 쿠키의 토큰을 검증 후 유저 정보 반환
136+
- 서비스 간 직접 REST API 통신
137+
138+
### 2. 간접 통신
139+
- **RabbitMQ RPC 패턴**
140+
- 요청 → 큐 발행 → 응답 큐 수신
141+
- `correlationId`를 활용해 요청-응답 매칭
142+
- 비동기 환경에서도 동기적 요청-응답 구조 구현
143+
144+
---
145+
146+
## ⚙️ CI/CD 파이프라인
147+
148+
### GitHub Actions
149+
- 코드 푸시 → 자동 빌드 & Docker Hub 푸시
150+
- 태그 형식: `YYYYMMDDHHMM`
151+
152+
### 배포 파이프라인
153+
1. GKE 로그인
154+
2. ConfigMap, Secret 적용
155+
3. DB, RabbitMQ 배포
156+
4. 서비스 Deployment 반영
157+
5. Ingress 적용
158+
6. 로그 확인
159+
160+
---
161+
162+
## 📺 데모 영상
163+
164+
[👉 UniUnity 프로젝트 데모 영상 보러가기]([https://example.com/demo-link](https://www.youtube.com/watch?v=r5Sv55nrUzY))

0 commit comments

Comments
 (0)