fix: Add Korean fonts to Docker image for PDF capture

- Add fonts-noto-cjk and fontconfig to backend Dockerfile
- Fixes garbled Korean text in performance check PDFs
- Update SERVER_INFRASTRUCTURE_PLAN.md with actual infrastructure

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
AutonetSellCar Deploy
2026-01-04 13:20:23 +09:00
parent 90202bee34
commit 1c45840c70
2 changed files with 156 additions and 95 deletions

View File

@@ -212,123 +212,174 @@ networks:
name: master-network name: master-network
``` ```
### 5.2 Server2 (MongolCar) - docker-compose.yml ### 5.2 Server2 (AutonetSellCar) - 실제 구성 (2025-01-04 적용)
**위치**: `/opt/autonet/production/``/opt/autonet/staging/`
**Production** (`docker-compose.production.yml`):
```yaml ```yaml
version: '3.8'
services: services:
# MongolCar Frontend frontend:
mongolcar-frontend: build:
build: ./mongolcar/frontend context: ./frontend
container_name: mongolcar-frontend dockerfile: Dockerfile
restart: unless-stopped args:
- NEXT_PUBLIC_API_URL=https://autonetsellcar.com
container_name: autonet-frontend
ports: ports:
- '3000:3000' - "3000:3000"
environment: environment:
- NEXT_PUBLIC_API_URL=http://192.168.0.202:8000 - NODE_ENV=production
depends_on: depends_on:
- mongolcar-backend - backend
# MongolCar Backend
mongolcar-backend:
build: ./mongolcar/backend
container_name: mongolcar-backend
restart: unless-stopped restart: unless-stopped
networks:
- mongolcar-network
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: autonet-backend
ports: ports:
- '8000:8000' - "8000:8000"
environment: env_file:
- DATABASE_URL=postgresql://admin:${DB_PASSWORD}@192.168.0.201:5432/mongolcar - ./backend/.env
- REDIS_URL=redis://:${REDIS_PASSWORD}@192.168.0.201:6379/0
- SECRET_KEY=${SECRET_KEY}
volumes: volumes:
- ./data/uploads:/app/uploads - /opt/autonet/production/backend/uploads:/app/uploads
# Carmodoo Agent (차량 데이터 수집)
carmodoo-agent:
build: ./carmodoo-agent
container_name: carmodoo-agent
restart: unless-stopped restart: unless-stopped
environment: networks:
- CARMODOO_USER_ID=${CARMODOO_USER_ID} - mongolcar-network
- CARMODOO_PASSWORD=${CARMODOO_PASSWORD}
- API_SERVER_URL=http://mongolcar-backend:8000/api
- AGENT_API_KEY=${AGENT_API_KEY}
volumes:
- ./data/agent:/app/data
- ./logs/agent:/app/logs
depends_on:
- mongolcar-backend
networks: networks:
default: mongolcar-network:
name: mongolcar-network external: true
``` ```
### 5.3 Server3 (Grantech & Cylinx) - docker-compose.yml **Staging** (`docker-compose.staging.yml`):
```yaml
services:
frontend-staging:
build:
context: ./frontend
dockerfile: Dockerfile
args:
- NEXT_PUBLIC_API_URL=https://staging.autonetsellcar.com
container_name: autonet-frontend-staging
ports:
- "3001:3000"
depends_on:
- backend-staging
restart: unless-stopped
networks:
- mongolcar-network
backend-staging:
build:
context: ./backend
dockerfile: Dockerfile
container_name: autonet-backend-staging
ports:
- "8001:8000"
env_file:
- ./backend/.env # DB_NAME=autonet_staging
volumes:
- /opt/autonet/production/backend/uploads:/app/uploads
restart: unless-stopped
networks:
- mongolcar-network
networks:
mongolcar-network:
external: true
```
**Server2 컨테이너 현황**:
| 컨테이너 | 포트 | 도메인 | DB | 상태 |
|----------|------|--------|-----|------|
| autonet-frontend | 3000 | autonetsellcar.com | - | ✅ 운영중 |
| autonet-backend | 8000 | (내부) | autonet | ✅ 운영중 |
| autonet-frontend-staging | 3001 | staging.autonetsellcar.com | - | ✅ 운영중 |
| autonet-backend-staging | 8001 | (내부) | autonet_staging | ✅ 운영중 |
### 5.3 Server3 (Grantech & Nextcloud) - 실제 구성 (2025-01-04 적용)
**위치**: `/home/damon/sites/grantech/docker-compose.yml`
```yaml ```yaml
version: '3.8'
services: services:
# Grantech Frontend frontend:
grantech-frontend: build:
build: ./grantech/frontend context: ./frontend
dockerfile: Dockerfile
container_name: grantech-frontend container_name: grantech-frontend
restart: unless-stopped
ports: ports:
- '3001:3000' - "3001:3001"
environment: environment:
- NEXT_PUBLIC_API_URL=http://192.168.0.203:8001 - NODE_ENV=production
depends_on:
- backend
restart: unless-stopped
networks:
- grantech-network
# Grantech Backend backend:
grantech-backend: build:
build: ./grantech/backend context: ./backend
dockerfile: Dockerfile
container_name: grantech-backend container_name: grantech-backend
restart: unless-stopped
ports: ports:
- '8001:8000' - "8001:8001"
environment: env_file:
- DATABASE_URL=postgresql://admin:${DB_PASSWORD}@192.168.0.201:5432/grantech - ./backend/.env
- REDIS_URL=redis://:${REDIS_PASSWORD}@192.168.0.201:6379/1 volumes:
- ./backend/uploads:/app/uploads
# Cylinx Frontend
cylinx-frontend:
build: ./cylinx/frontend
container_name: cylinx-frontend
restart: unless-stopped restart: unless-stopped
ports: networks:
- '3002:3000' - grantech-network
environment:
- NEXT_PUBLIC_API_URL=http://192.168.0.203:8002
# Cylinx Backend
cylinx-backend:
build: ./cylinx/backend
container_name: cylinx-backend
restart: unless-stopped
ports:
- '8002:8000'
environment:
- DATABASE_URL=postgresql://admin:${DB_PASSWORD}@192.168.0.201:5432/cylinx
- REDIS_URL=redis://:${REDIS_PASSWORD}@192.168.0.201:6379/2
networks: networks:
default: grantech-network:
name: sites-network driver: bridge
``` ```
**Nextcloud** (별도 docker-compose):
```yaml
# Nextcloud - cloud.grantech.kr
services:
nextcloud:
image: nextcloud:latest
container_name: nextcloud
ports:
- "8080:80"
restart: unless-stopped
nextcloud-db:
image: mariadb:10.6
container_name: nextcloud-db
restart: unless-stopped
```
**Server3 컨테이너 현황**:
| 컨테이너 | 포트 | 도메인 | 상태 |
|----------|------|--------|------|
| grantech-frontend | 3001 | grantech.kr | ✅ 운영중 |
| grantech-backend | 8001 | api.grantech.kr | ✅ 운영중 |
| nextcloud | 8080 | cloud.grantech.kr | ✅ 운영중 |
| nextcloud-db | 3306 | (내부) | ✅ 운영중 |
--- ---
## 6. 데이터베이스 설계 ## 6. 데이터베이스 설계
### 6.1 PostgreSQL 데이터베이스 분리 ### 6.1 PostgreSQL 데이터베이스 분리
| 데이터베이스 | 용도 | Redis DB | | 데이터베이스 | 용도 | Redis DB | 상태 |
|-------------|------|----------| |-------------|------|----------|------|
| mongolcar | MongolCar 서비스 | 0 | | `autonet` | AutonetSellCar Production | 0 | ✅ 운영중 |
| grantech | Grantech 서비스 | 1 | | `autonet_staging` | AutonetSellCar Staging | 0 | ✅ 운영중 |
| cylinx | Cylinx 서비스 | 2 | | `grantech` | Grantech 서비스 | 1 | ✅ 운영중 |
| `cylinx` | Cylinx 서비스 (예정) | 2 | ⏳ 미구축 |
### 6.2 MongolCar 주요 테이블 ### 6.2 MongolCar 주요 테이블
@@ -435,18 +486,23 @@ CREATE INDEX idx_cars_status ON cars(status);
## 7. Nginx Proxy Manager 설정 ## 7. Nginx Proxy Manager 설정
### 7.1 Proxy Hosts 설정 **관리 UI**: http://192.168.0.201:81
| Domain | Scheme | Forward Host | Forward Port | SSL | ### 7.1 Proxy Hosts 설정 (실제 운영중 - 2025-01-04)
|--------|--------|--------------|--------------|-----|
| autonetsellcar.com | http | 192.168.0.202 | 3000 | Let's Encrypt | | Domain | Scheme | Forward Host | Forward Port | SSL | 상태 |
| api.autonetsellcar.com | http | 192.168.0.202 | 8000 | Let's Encrypt | |--------|--------|--------------|--------------|-----|------|
| grantech.kr | http | 192.168.0.203 | 3001 | Let's Encrypt | | autonetsellcar.com | http | 192.168.0.202 | 3000 | Let's Encrypt | ✅ 운영중 |
| api.grantech.kr | http | 192.168.0.203 | 8001 | Let's Encrypt | | staging.autonetsellcar.com | http | 192.168.0.202 | 3001 | Let's Encrypt | ✅ 운영중 |
| cylinx.kr | http | 192.168.0.203 | 3002 | Let's Encrypt | | grantech.kr | http | 192.168.0.203 | 3001 | Let's Encrypt | ✅ 운영중 |
| api.cylinx.kr | http | 192.168.0.203 | 8002 | Let's Encrypt | | api.grantech.kr | http | 192.168.0.203 | 8001 | Let's Encrypt | ✅ 운영중 |
| portainer.local | http | 192.168.0.201 | 9000 | - | | cloud.grantech.kr | http | 192.168.0.203 | 8080 | Let's Encrypt | ✅ 운영중 |
| grafana.local | http | 192.168.0.201 | 3100 | - | | cylinx.kr | http | 192.168.0.203 | 3002 | Let's Encrypt | ⏳ 예정 |
| api.cylinx.kr | http | 192.168.0.203 | 8002 | Let's Encrypt | ⏳ 예정 |
| portainer.local | http | 192.168.0.201 | 9000 | - | ✅ 내부용 |
| grafana.local | http | 192.168.0.201 | 3100 | - | ✅ 내부용 |
> **참고**: AutonetSellCar Backend API는 별도 프록시 없이 Frontend에서 직접 호출 (같은 도메인, Next.js rewrites 사용)
--- ---
@@ -609,3 +665,4 @@ find /backup -type d -mtime +7 -exec rm -rf {} \;
--- ---
*Generated by Claude Code - 2025-11-28* *Generated by Claude Code - 2025-11-28*
*Updated: 2025-01-04 - Grantech Docker 전환, AutonetSellCar Staging 추가, Nginx Proxy Manager 실제 설정 반영*

View File

@@ -24,7 +24,11 @@ RUN apt-get update && apt-get install -y \
libasound2 \ libasound2 \
libpango-1.0-0 \ libpango-1.0-0 \
libcairo2 \ libcairo2 \
&& rm -rf /var/lib/apt/lists/* # Korean fonts for PDF capture
fonts-noto-cjk \
fontconfig \
&& rm -rf /var/lib/apt/lists/* \
&& fc-cache -fv
# Install Python dependencies # Install Python dependencies
COPY requirements.txt . COPY requirements.txt .