Files
document-server/docker-compose.synology.yml
Hyungi Ahn 0dc4e3523f 노트북 관리 UI 완성
🎯 주요 개선사항:
- 노트북 목록 조회/표시 기능 완성
- 노트북 생성/편집/삭제 모달 구현
- 토스트 알림 시스템 추가 (alert 대신)
- 노트북 통계 대시보드 표시
- 노트북별 노트 관리 및 빠른 노트 생성 기능
- URL 파라미터를 통한 노트북 자동 설정

🔧 기술적 개선:
- CSS line-clamp 클래스 추가
- 필드명 불일치 수정 (notebook.name → notebook.title)
- 삭제 확인 모달로 UX 개선
- 노트 에디터에서 노트북 자동 설정 지원

📱 UI/UX 개선:
- 노트북 카드 호버 효과 및 색상 테마
- 빈 노트북 상태 처리 및 안내
- 반응형 그리드 레이아웃
- 로딩 상태 및 에러 처리 개선
2025-09-02 16:38:47 +09:00

155 lines
4.1 KiB
YAML

version: '3.8'
services:
# PostgreSQL 데이터베이스 (SSD 최적화)
database:
image: postgres:15-alpine
container_name: document-server-db
restart: unless-stopped
environment:
POSTGRES_DB: document_server
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ${DB_PASSWORD:-postgres123}
POSTGRES_INITDB_ARGS: "--encoding=UTF8 --locale=C"
volumes:
# SSD: 데이터베이스 성능 최적화
- /volume1/docker/document-server/database:/var/lib/postgresql/data
- /volume1/docker/document-server/config/postgresql.conf:/etc/postgresql/postgresql.conf:ro
ports:
- "24101:5432"
command: >
postgres
-c config_file=/etc/postgresql/postgresql.conf
-c shared_buffers=8GB
-c effective_cache_size=24GB
-c work_mem=256MB
-c maintenance_work_mem=2GB
-c checkpoint_completion_target=0.9
-c wal_buffers=64MB
-c random_page_cost=1.1
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 30s
timeout: 10s
retries: 3
networks:
- document-network
# Redis 캐시 (SSD 최적화)
redis:
image: redis:7-alpine
container_name: document-server-redis
restart: unless-stopped
volumes:
# SSD: 캐시 성능 최적화
- /volume1/docker/document-server/redis:/data
ports:
- "24103:6379"
command: >
redis-server
--maxmemory 4gb
--maxmemory-policy allkeys-lru
--save 900 1
--save 300 10
--save 60 10000
--appendonly yes
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 30s
timeout: 10s
retries: 3
networks:
- document-network
# FastAPI 백엔드
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: document-server-backend
restart: unless-stopped
environment:
- DATABASE_URL=postgresql://postgres:${DB_PASSWORD:-postgres123}@database:5432/document_server
- REDIS_URL=redis://redis:6379
- JWT_SECRET_KEY=${JWT_SECRET_KEY:-your-super-secret-jwt-key-change-this-in-production}
- ENVIRONMENT=production
- LOG_LEVEL=INFO
volumes:
# SSD: 로그 및 설정 (빠른 액세스)
- /volume1/docker/document-server/logs:/app/logs
- /volume1/docker/document-server/config:/app/config
# HDD: 대용량 파일 저장 (비용 효율적)
- /volume2/document-storage/uploads:/app/uploads
- /volume2/document-storage/documents:/app/documents
ports:
- "24102:8000"
depends_on:
database:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
networks:
- document-network
# Nginx 웹서버
nginx:
build:
context: ./nginx
dockerfile: Dockerfile
container_name: document-server-nginx
restart: unless-stopped
volumes:
# SSD: 설정 및 캐시 (빠른 액세스)
- /volume1/docker/document-server/nginx:/etc/nginx/conf.d
- /volume1/docker/document-server/logs/nginx:/var/log/nginx
# HDD: 정적 파일 서빙 (읽기 전용)
- /volume2/document-storage/documents:/usr/share/nginx/html/documents:ro
- ./frontend:/usr/share/nginx/html:ro
ports:
- "24100:80"
depends_on:
backend:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:80/health"]
interval: 30s
timeout: 10s
retries: 3
networks:
- document-network
networks:
document-network:
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/16
volumes:
# 명시적 볼륨 정의 (시놀로지 경로 매핑)
database_data:
driver: local
driver_opts:
type: none
o: bind
device: /volume1/docker/document-server/database
redis_data:
driver: local
driver_opts:
type: none
o: bind
device: /volume1/docker/document-server/redis
document_storage:
driver: local
driver_opts:
type: none
o: bind
device: /volume2/document-storage