-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.local.yml
More file actions
117 lines (112 loc) · 2.72 KB
/
docker-compose.local.yml
File metadata and controls
117 lines (112 loc) · 2.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
services:
# FastAPI Application
app:
build:
context: .
dockerfile: Dockerfile
container_name: logit-fastapi
command: fastapi dev src/main.py --host 0.0.0.0 --port 8000
ports:
- "8000:8000"
volumes:
- ./src:/app/src
- ./alembic:/app/alembic
- ./scripts:/app/scripts
env_file:
- .env
environment:
# Database connection (uses .env variables)
- DATABASE_URL=postgresql+asyncpg://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
- POSTGRES_SERVER=postgres
- POSTGRES_PORT=5432
# Redis
- REDIS_URL=redis://redis:6379/0
# Qdrant
- QDRANT_HOST=qdrant
- QDRANT_PORT=6333
# MCP
- MCP_JWT_SECRET=${MCP_JWT_SECRET}
# Environment (local로 설정)
- ENVIRONMENT=local
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
qdrant:
condition: service_healthy
networks:
- logit-network
develop:
watch:
- action: sync
path: ./src
target: /app/src
ignore:
- __pycache__/
- action: rebuild
path: ./pyproject.toml
# PostgreSQL Database
postgres:
image: postgres:16-alpine
container_name: logit-postgres
restart: unless-stopped
env_file:
- .env
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_HOST_AUTH_METHOD=trust
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- logit-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
# Redis Cache
redis:
image: redis:7-alpine
container_name: logit-redis
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- redis_data:/data
networks:
- logit-network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
# Qdrant Vector Database (production-grade, 5x faster than ChromaDB)
qdrant:
image: qdrant/qdrant:latest
container_name: logit-qdrant
restart: unless-stopped
ports:
- "6333:6333" # REST API
- "6334:6334" # gRPC API
volumes:
- qdrant_data:/qdrant/storage
networks:
- logit-network
healthcheck:
test: ["CMD-SHELL", "timeout 10s bash -c ':> /dev/tcp/127.0.0.1/6333' || exit 1"]
interval: 5s
timeout: 5s
retries: 5
start_period: 5s
volumes:
postgres_data:
redis_data:
qdrant_data:
networks:
logit-network:
driver: bridge