Skip to content

Commit be5410d

Browse files
committed
doker refactor
1 parent eaa2fd1 commit be5410d

3 files changed

Lines changed: 82 additions & 6 deletions

File tree

.env.example

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,46 @@
1+
# ==============================================================================
2+
# DATABASE CONFIGURATION (PostgreSQL)
3+
# ==============================================================================
14
POSTGRES_USER=seratonin
2-
POSTGRES_PASSWORD=seratonin_pass
5+
POSTGRES_PASSWORD=your_secure_password_here
36
POSTGRES_DB=seratonin_db
47
POSTGRES_HOST=postgres
58
POSTGRES_PORT=5432
69

10+
# External port for host machine access
11+
EXTERNAL_POSTGRES_PORT=5433
12+
13+
# ==============================================================================
14+
# CACHE & BROKER CONFIGURATION (Redis)
15+
# ==============================================================================
716
REDIS_HOST=redis
817
REDIS_PORT=6379
918

19+
# External port for host machine access
20+
EXTERNAL_REDIS_PORT=6380
21+
22+
# ==============================================================================
23+
# VECTOR SEARCH CONFIGURATION (Qdrant)
24+
# ==============================================================================
1025
QDRANT_HOST=qdrant
1126
QDRANT_PORT=6333
1227
QDRANT_GRPC_PORT=6334
1328

14-
EXTERNAL_POSTGRES_PORT=5433
15-
EXTERNAL_REDIS_PORT=6380
29+
# External ports for host machine access
1630
EXTERNAL_QDRANT_PORT=6333
1731
EXTERNAL_QDRANT_GRPC_PORT=6334
1832

19-
OPENAI_API_KEY=sk-dummy-test-key-for-ci
20-
ANTHROPIC_API_KEY=dummy-test-key-for-ci
21-
PUBMED_API_KEY=dummy-test-key-for-ci
33+
# ==============================================================================
34+
# AI & LLM PROVIDERS
35+
# ==============================================================================
36+
OPENAI_API_KEY=your_openai_api_key_here
37+
ANTHROPIC_API_KEY=your_anthropic_api_key_here
38+
39+
# Routing settings for cost optimization
40+
# Requests with prompt length > threshold will use cheaper models [cite: 3]
41+
LLM_COST_THRESHOLD_CHARS=25000
42+
43+
# ==============================================================================
44+
# EXTERNAL INTEGRATIONS
45+
# ==============================================================================
46+
PUBMED_API_KEY=your_pubmed_api_key_here

infra/docker-compose.dev.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
services:
2+
postgres:
3+
ports:
4+
- "${EXTERNAL_POSTGRES_PORT:-5433}:5432"
5+
6+
redis:
7+
ports:
8+
- "${EXTERNAL_REDIS_PORT:-6380}:6379"
9+
10+
qdrant:
11+
ports:
12+
- "${EXTERNAL_QDRANT_PORT:-6333}:6333"
13+
- "${EXTERNAL_QDRANT_GRPC_PORT:-6334}:6334"

infra/docker/docker-compose.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
services:
2+
postgres:
3+
image: postgres:15-alpine
4+
restart: unless-stopped
5+
environment:
6+
POSTGRES_USER: ${POSTGRES_USER:-seratonin}
7+
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-seratonin_pass}
8+
POSTGRES_DB: ${POSTGRES_DB:-seratonin_db}
9+
volumes:
10+
- postgres_data:/var/lib/postgresql/data
11+
healthcheck:
12+
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-seratonin} -d ${POSTGRES_DB:-seratonin_db}"]
13+
interval: 10s
14+
timeout: 5s
15+
retries: 5
16+
17+
redis:
18+
image: redis:7.2-alpine
19+
restart: unless-stopped
20+
command: redis-server --appendonly yes
21+
volumes:
22+
- redis_data:/data
23+
healthcheck:
24+
test: ["CMD", "redis-cli", "ping"]
25+
interval: 10s
26+
timeout: 5s
27+
retries: 5
28+
29+
qdrant:
30+
image: qdrant/qdrant:latest
31+
restart: unless-stopped
32+
volumes:
33+
- qdrant_data:/qdrant/storage
34+
35+
volumes:
36+
postgres_data:
37+
redis_data:
38+
qdrant_data:

0 commit comments

Comments
 (0)