-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
62 lines (58 loc) · 1.34 KB
/
docker-compose.yml
File metadata and controls
62 lines (58 loc) · 1.34 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
version: "3.9"
services:
# Redis for realtime log streaming
redis:
image: redis:7-alpine
container_name: luxia-redis
restart: always
ports:
- "6379:6379"
volumes:
- redis_data:/data
command: redis-server --appendonly yes --dir /data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
- luxia-network
# FastAPI Worker Service
worker:
build: .
container_name: luxia-worker
restart: always
depends_on:
redis:
condition: service_healthy
env_file:
- .env
environment:
# Override Redis URL to use Docker service name
REDIS_URL: "redis://redis:6379"
LOG_DB_PATH: "/app/data/logs.db"
ports:
- "9000:9000"
volumes:
# Persist SQLite logs database in a directory
- logs_data:/app/data
# Cache downloaded embedding models (prevents re-download on container restart)
- model_cache:/app/model_cache
networks:
- luxia-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/admin/logs?limit=1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
volumes:
redis_data:
driver: local
logs_data:
driver: local
model_cache:
driver: local
networks:
luxia-network:
driver: bridge