Repository navigation
Expand file tree
/
Copy pathcompose.yaml
More file actions
77 lines (77 loc) · 2.21 KB
/
Copy pathcompose.yaml
File metadata and controls
77 lines (77 loc) · 2.21 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
name: commlab
x-backend: &backend
build: ./backend
environment: &environment
DATABASE_URL: postgresql+psycopg://commlab:${POSTGRES_PASSWORD:-local-commlab-change-me}@postgres:5432/commlab
REDIS_URL: redis://redis:6379/0
ARTIFACT_ROOT: /data/artifacts
METRICS_TOKEN: ${METRICS_TOKEN:-local-metrics-change-me}
OLLAMA_URL: ${OLLAMA_URL:-http://host.docker.internal:11434}
LLM_MODEL: ${LLM_MODEL:-}
EMBEDDING_MODEL: ${EMBEDDING_MODEL:-}
EMBEDDING_REVISION: ${EMBEDDING_REVISION:-}
volumes:
- artifacts:/data/artifacts
depends_on:
migrate:
condition: service_completed_successfully
redis:
condition: service_healthy
restart: unless-stopped
services:
postgres:
image: pgvector/pgvector:0.8.0-pg16
environment:
POSTGRES_USER: commlab
POSTGRES_DB: commlab
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-local-commlab-change-me}
volumes:
- postgres:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U commlab -d commlab"]
interval: 3s
retries: 20
redis:
image: redis:7.4.3-alpine
command: ["redis-server", "--appendonly", "yes"]
volumes:
- redis:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 3s
retries: 20
migrate:
build: ./backend
environment: *environment
command: ["alembic", "upgrade", "head"]
depends_on:
postgres:
condition: service_healthy
api:
<<: *backend
ports: ["127.0.0.1:8000:8000"]
dispatcher:
<<: *backend
command: ["python", "-m", "commlab.worker"]
simulation-worker:
<<: *backend
command: ["dramatiq", "commlab.worker", "--processes", "1", "--threads", "1", "--queues", "simulation"]
mem_limit: 512m
cpus: 1
ingestion-worker:
<<: *backend
command: ["dramatiq", "commlab.worker", "--processes", "1", "--threads", "1", "--queues", "ingestion"]
mem_limit: 512m
cpus: 1
investigator-worker:
<<: *backend
command: ["dramatiq", "commlab.worker", "--processes", "1", "--threads", "1", "--queues", "investigation"]
mem_limit: 512m
web:
build: ./frontend
ports: ["127.0.0.1:8080:80"]
depends_on: [api]
volumes:
postgres:
redis:
artifacts: