✨ Features implemented: - FastAPI backend with JWT authentication - PostgreSQL database with async SQLAlchemy - HTML document viewer with smart highlighting - Note system connected to highlights (1:1 relationship) - Bookmark system for quick navigation - Integrated search (documents + notes) - Tag system for document organization - Docker containerization with Nginx 🔧 Technical stack: - Backend: FastAPI + PostgreSQL + Redis - Frontend: Alpine.js + Tailwind CSS - Authentication: JWT tokens - File handling: HTML + PDF support - Search: Full-text search with relevance scoring 📋 Core functionality: - Text selection → Highlight creation - Highlight → Note attachment - Note management with search/filtering - Bookmark creation at scroll positions - Document upload with metadata - User management (admin creates accounts)
69 lines
1.6 KiB
YAML
69 lines
1.6 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
# 개발용 Nginx
|
|
nginx:
|
|
build: ./nginx
|
|
container_name: document-server-nginx-dev
|
|
ports:
|
|
- "24100:80"
|
|
volumes:
|
|
- ./frontend:/usr/share/nginx/html
|
|
- ./uploads:/usr/share/nginx/html/uploads
|
|
- ./nginx/nginx.dev.conf:/etc/nginx/nginx.conf
|
|
depends_on:
|
|
- backend
|
|
networks:
|
|
- document-network
|
|
|
|
# 개발용 Backend (핫 리로드)
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile.dev
|
|
container_name: document-server-backend-dev
|
|
ports:
|
|
- "24102:8000"
|
|
volumes:
|
|
- ./uploads:/app/uploads
|
|
- ./backend:/app
|
|
environment:
|
|
- DATABASE_URL=postgresql://docuser:docpass@database:5432/document_db
|
|
- PAPERLESS_URL=${PAPERLESS_URL:-http://localhost:8000}
|
|
- PAPERLESS_TOKEN=${PAPERLESS_TOKEN:-}
|
|
- DEBUG=true
|
|
- RELOAD=true
|
|
depends_on:
|
|
- database
|
|
networks:
|
|
- document-network
|
|
|
|
# 개발용 데이터베이스 (데이터 영속성 없음)
|
|
database:
|
|
image: postgres:15-alpine
|
|
container_name: document-server-db-dev
|
|
ports:
|
|
- "24101:5432"
|
|
environment:
|
|
- POSTGRES_DB=document_db
|
|
- POSTGRES_USER=docuser
|
|
- POSTGRES_PASSWORD=docpass
|
|
volumes:
|
|
- ./database/init:/docker-entrypoint-initdb.d
|
|
networks:
|
|
- document-network
|
|
|
|
# 개발용 Redis
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: document-server-redis-dev
|
|
ports:
|
|
- "24103:6379"
|
|
networks:
|
|
- document-network
|
|
command: redis-server
|
|
|
|
networks:
|
|
document-network:
|
|
driver: bridge
|