-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
90 lines (85 loc) · 2.23 KB
/
docker-compose.yml
File metadata and controls
90 lines (85 loc) · 2.23 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
services:
# ----------------------------------------
# Sparkth API Service
# ----------------------------------------
api:
build:
context: .
dockerfile: Dockerfile.local
# Requires sparkth-base:local — run `make base` first (or `make up` handles it automatically)
image: sparkth:local
restart: unless-stopped
ports:
- "127.0.0.1:7727:7727"
env_file:
- .env
environment:
DATABASE_URL: postgresql://sparkth:sparkth_password@db:5432/sparkth
CHAT_REDIS_URL: redis://redis:6379
PORT: "7727"
TOKENIZERS_PARALLELISM: "false"
volumes:
- ./app:/app/app
- ./frontend/out:/app/frontend/out
- ./logs:/app/logs
depends_on:
- db
- redis
# ----------------------------------------
# Postgres
# ----------------------------------------
db:
image: docker.io/pgvector/pgvector:pg18
restart: unless-stopped
environment:
POSTGRES_USER: sparkth
POSTGRES_PASSWORD: sparkth_password
POSTGRES_DB: sparkth
volumes:
- postgres_data:/var/lib/postgresql
# ----------------------------------------
# Redis
# ----------------------------------------
redis:
image: docker.io/redis:7-alpine
restart: unless-stopped
volumes:
- redis_data:/data
# ----------------------------------------
# RAG Cleanup Job
# ----------------------------------------
rag-cleanup:
image: sparkth:local
pull_policy: never
env_file:
- .env
environment:
DATABASE_URL: postgresql://sparkth:sparkth_password@db:5432/sparkth
TOKENIZERS_PARALLELISM: "false"
volumes:
- ./app:/app/app
command: python -m app.rag.cleanup
depends_on:
- db
restart: "no"
# ----------------------------------------
# Alembic Migrations
# ----------------------------------------
migrations:
image: sparkth:local
pull_policy: never
environment:
DATABASE_URL: postgresql://sparkth:sparkth_password@db:5432/sparkth
volumes:
- ./app:/app/app
command: >
sh -c "
echo '⏳ Waiting for DB...' &&
alembic upgrade head &&
echo '✅ Alembic migrations complete'
"
depends_on:
- db
volumes:
postgres_data:
redis_data: