-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
143 lines (131 loc) · 3.77 KB
/
Copy pathdocker-compose.yml
File metadata and controls
143 lines (131 loc) · 3.77 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
version: "3.9"
services:
# PostgreSQL Database
postgres:
image: postgres:16-alpine
container_name: tva-postgres
environment:
POSTGRES_USER: ${DB_USER:-tva}
POSTGRES_PASSWORD: ${DB_PASSWORD:-tva_password}
POSTGRES_DB: ${DB_NAME:-tva_db}
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-tva} -h postgres"]
interval: 10s
timeout: 5s
retries: 5
networks:
- tva-network
# ChromaDB Vector Database
chromadb:
image: chromadb/chroma:0.5.23
container_name: tva-chromadb
environment:
IS_PERSISTENT: "TRUE"
PERSIST_DIRECTORY: /chroma/chroma
ANONYMIZED_TELEMETRY: "FALSE"
ports:
- "8000:8000"
volumes:
- /chroma_data
healthcheck:
test:
[
"CMD",
"bash",
"-c",
"curl -f http://localhost:8000/api/v1/heartbeat || exit 0",
]
interval: 15s
timeout: 10s
retries: 5
start_period: 20s
networks:
- tva-network
# FastAPI Backend
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: tva-backend
environment:
# Database
DATABASE_URL: postgresql+asyncpg://${DB_USER:-tva}:${DB_PASSWORD:-tva_password}@postgres:5432/${DB_NAME:-tva_db}
DB_USER: ${DB_USER:-tva}
DB_PASSWORD: ${DB_PASSWORD:-tva_password}
DB_NAME: ${DB_NAME:-tva_db}
# ChromaDB
CHROMADB_HOST: chromadb
CHROMADB_PORT: 8000
CHROMA_DB_PATH: /chroma_data
# APIs
UPSTAGE_API_KEY: ${UPSTAGE_API_KEY}
# JWT
JWT_SECRET_KEY: ${JWT_SECRET_KEY:-tva-backend-secret-key-change-in-production}
JWT_ALGORITHM: ${JWT_ALGORITHM:-HS256}
ACCESS_TOKEN_EXPIRE_MINUTES: ${ACCESS_TOKEN_EXPIRE_MINUTES:-1440}
REFRESH_TOKEN_EXPIRE_DAYS: ${REFRESH_TOKEN_EXPIRE_DAYS:-7}
# CORS
ALLOWED_ORIGINS: ${ALLOWED_ORIGINS:-*}
# LLM Settings
LLM_MODEL: ${LLM_MODEL:-upstage-solar-pro}
LLM_TEMPERATURE: ${LLM_TEMPERATURE:-0.3}
LLM_MAX_TOKENS: ${LLM_MAX_TOKENS:-2000}
LLM_TOP_P: ${LLM_TOP_P:-0.9}
# Server
ENVIRONMENT: ${ENVIRONMENT:-development}
DEBUG: ${DEBUG:-true}
LOG_LEVEL: ${LOG_LEVEL:-INFO}
ports:
- "8001:8000"
depends_on:
postgres:
condition: service_healthy
chromadb:
condition: service_healthy
volumes:
- ./backend/app:/app/app
- ./backend/tests:/app/tests
- ./backend/uploads:/app/uploads
command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
networks:
- tva-network
# Frontend
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: tva-frontend
ports:
- "3000:5173"
environment:
- VITE_API_BASE_URL=${VITE_API_BASE_URL:-http://localhost:8001}
- VITE_API_VERSION=${VITE_API_VERSION:-v1}
- VITE_APP_NAME=${VITE_APP_NAME:-TVA}
- VITE_APP_DESCRIPTION=${VITE_APP_DESCRIPTION:-Target Validation Assistant}
- VITE_ENABLE_DEBUG=${VITE_ENABLE_DEBUG:-true}
- VITE_SESSION_TIMEOUT_MINUTES=${VITE_SESSION_TIMEOUT_MINUTES:-30}
- VITE_TOKEN_REFRESH_BUFFER_MINUTES=${VITE_TOKEN_REFRESH_BUFFER_MINUTES:-5}
volumes:
- ./frontend/src:/app/src
- ./frontend/public:/app/public
- ./frontend/index.html:/app/index.html
- ./frontend/vite.config.js:/app/vite.config.js
- ./frontend/tailwind.config.js:/app/tailwind.config.js
- ./frontend/postcss.config.cjs:/app/postcss.config.cjs
- /app/node_modules
depends_on:
- backend
networks:
- tva-network
volumes:
postgres_data:
driver: local
chroma_data:
driver: local
networks:
tva-network:
driver: bridge