docs: Update README.md with current deployment configuration

- Add hybrid deployment port configuration (Docker + K8s)
- Update service architecture to reflect current setup
- Document Docker Hub deployment process
- Clarify infrastructure vs application service separation
- Add health check endpoints for both deployment modes

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
jungwoo choi
2025-09-28 22:27:03 +09:00
parent 46b5135f45
commit aa89057bec

124
README.md
View File

@ -33,21 +33,48 @@ Site11은 다국어 뉴스 콘텐츠를 자동으로 수집, 번역, 생성하
- **OS**: Linux, macOS, Windows with WSL2 - **OS**: Linux, macOS, Windows with WSL2
### 포트 사용 ### 포트 사용
#### 하이브리드 배포 포트 구성 (현재 구성)
```
[ Docker Compose - 인프라 서비스 ]
- 27017: MongoDB (내부)
- 6379: Redis (내부)
- 9092: Kafka (내부)
- 2181: Zookeeper (내부)
- 5555: Docker Registry (내부)
- 8099: Pipeline Scheduler
- 8100: Pipeline Monitor
[ Kubernetes - 마이크로서비스 (NodePort) ]
- 30080: Console Frontend (→ 8080)
- 30800: Console Backend API Gateway (→ 8000)
- 30801-30802: Images Service (→ 8001-8002)
- 30803-30804: OAuth Service (→ 8003-8004)
- 30805-30806: Applications Service (→ 8005-8006)
- 30807-30808: Users Service (→ 8007-8008)
- 30809-30810: Data Service (→ 8009-8010)
- 30811-30812: Statistics Service (→ 8011-8012)
[ Pipeline Workers (K8s 내부) ]
- RSS Collector
- Google Search
- Translator
- AI Article Generator
- Image Generator
```
#### 표준 Docker Compose 포트 구성 (전체 Docker 모드)
``` ```
- 3000: Console Frontend - 3000: Console Frontend
- 8011: Console Backend (API Gateway) - 8000: Console Backend (API Gateway)
- 8012: Users Backend - 8001-8002: Images Service
- 8013: Notifications Backend - 8003-8004: OAuth Service
- 8014: OAuth Backend - 8005-8006: Applications Service
- 8015: Images Backend - 8007-8008: Users Service
- 8016: Google Search Backend - 8009-8010: Data Service
- 8017: RSS Feed Backend - 8011-8012: Statistics Service
- 8018: News Aggregator Backend - 8099: Pipeline Scheduler
- 8019: AI Writer Backend
- 8100: Pipeline Monitor - 8100: Pipeline Monitor
- 8983: Solr Search Engine
- 9000: MinIO Object Storage
- 9001: MinIO Console
- 27017: MongoDB (내부) - 27017: MongoDB (내부)
- 6379: Redis (내부) - 6379: Redis (내부)
- 9092: Kafka (내부) - 9092: Kafka (내부)
@ -92,18 +119,40 @@ docker-compose logs -f
``` ```
### 4. 서비스 확인 ### 4. 서비스 확인
#### 하이브리드 배포 확인 (현재 구성)
```bash ```bash
# Console Frontend 접속 (K8s NodePort)
open http://localhost:30080
# Console API 헬스 체크 (K8s NodePort)
curl http://localhost:30800/health
curl http://localhost:30800/api/health
# Pipeline 모니터 확인 (Docker)
curl http://localhost:8100/health
# MongoDB 연결 확인 (Docker)
docker exec -it site11_mongodb mongosh --eval "db.serverStatus()"
# K8s Pod 상태 확인
kubectl -n site11-pipeline get pods
kubectl -n site11-pipeline get services
```
#### 표준 Docker 확인
```bash
# Console Frontend 접속
open http://localhost:3000
# Console API 헬스 체크 # Console API 헬스 체크
curl http://localhost:8011/health curl http://localhost:8000/health
# MongoDB 연결 확인 # MongoDB 연결 확인
docker exec -it site11_mongodb mongosh --eval "db.serverStatus()" docker exec -it site11_mongodb mongosh --eval "db.serverStatus()"
# Pipeline 모니터 확인 # Pipeline 모니터 확인
curl http://localhost:8100/health curl http://localhost:8100/health
# Console UI 접속
open http://localhost:3000
``` ```
## 상세 설치 가이드 (Detailed Installation) ## 상세 설치 가이드 (Detailed Installation)
@ -464,12 +513,14 @@ Site11은 Docker Compose와 Kubernetes를 함께 사용하는 하이브리드
### 배포 아키텍처 ### 배포 아키텍처
#### Docker Compose (인프라 및 중앙 제어) #### Docker Compose (인프라 서비스)
- **인프라**: MongoDB, Redis, Kafka, Zookeeper - **인프라**: MongoDB, Redis, Kafka, Zookeeper
- **중앙 제어**: Pipeline Scheduler, Pipeline Monitor, Language Sync - **중앙 제어**: Pipeline Scheduler, Pipeline Monitor, Language Sync
- **관리 콘솔**: Console Backend/Frontend - **레지스트리**: Docker Registry (port 5555)
#### Kubernetes (무상태 워커) #### Kubernetes (애플리케이션 및 파이프라인)
- **관리 콘솔**: Console Backend/Frontend
- **마이크로서비스**: Images, OAuth, Applications, Users, Data, Statistics
- **데이터 수집**: RSS Collector, Google Search - **데이터 수집**: RSS Collector, Google Search
- **처리 워커**: Translator, AI Article Generator, Image Generator - **처리 워커**: Translator, AI Article Generator, Image Generator
- **자동 스케일링**: HPA(Horizontal Pod Autoscaler) 적용 - **자동 스케일링**: HPA(Horizontal Pod Autoscaler) 적용
@ -488,15 +539,40 @@ docker-compose -f docker-compose-hybrid.yml ps
docker-compose -f docker-compose-hybrid.yml logs -f pipeline-scheduler docker-compose -f docker-compose-hybrid.yml logs -f pipeline-scheduler
``` ```
#### 2. K8s 워커 배포 #### 2. Docker Hub를 사용한 K8s 배포 (권장)
```bash ```bash
# K8s 매니페스트 디렉토리로 이동 # Docker Hub에 이미지 푸시
./deploy-dockerhub.sh
# K8s 네임스페이스 및 설정 생성
kubectl create namespace site11-pipeline
kubectl -n site11-pipeline apply -f k8s/pipeline/configmap.yaml
kubectl -n site11-pipeline apply -f k8s/pipeline/secrets.yaml
# Docker Hub 이미지로 배포
cd k8s/pipeline cd k8s/pipeline
for service in console-backend console-frontend \
ai-article-generator translator image-generator \
rss-collector google-search; do
kubectl apply -f ${service}-dockerhub.yaml
done
# API 키 설정 (configmap.yaml 편집) # 배포 상태 확인
vim configmap.yaml kubectl -n site11-pipeline get pods
kubectl -n site11-pipeline get services
kubectl -n site11-pipeline get hpa
```
# 배포 실행 #### 3. 로컬 레지스트리를 사용한 K8s 배포 (대안)
```bash
# 로컬 레지스트리 시작 (Docker Compose)
docker-compose -f docker-compose-hybrid.yml up -d registry
# 이미지 빌드 및 푸시
./deploy-local.sh
# K8s 배포
cd k8s/pipeline
./deploy.sh ./deploy.sh
# 배포 상태 확인 # 배포 상태 확인