-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
110 lines (105 loc) · 2.95 KB
/
Copy pathdocker-compose.yml
File metadata and controls
110 lines (105 loc) · 2.95 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
# Local development stack for WikiMind.
#
# Services
# gateway — FastAPI app (uvicorn --reload), code mounted from host
# redis — broker/result store for ARQ background jobs
# worker — ARQ worker consuming the same code mount as the gateway
# docling — PDF extraction sidecar (docling-serve)
#
# Bring up: make docker-up
# Build: make docker-build
# Tear down: docker compose down -v
services:
gateway:
build:
context: .
dockerfile: Dockerfile
target: dev
image: wikimind-dev:latest
container_name: wikimind-gateway
command: uv run uvicorn wikimind.main:app --host 0.0.0.0 --port 7842 --reload
environment:
WIKIMIND_DATA_DIR: /data
WIKIMIND_SERVER__HOST: 0.0.0.0
WIKIMIND_SERVER__PORT: "7842"
WIKIMIND_REDIS_URL: redis://redis:6379/0
WIKIMIND_DOCLING_SERVE_URL: http://docling:5001
UV_LINK_MODE: copy
env_file:
- path: .env
required: false
ports:
- "7842:7842"
volumes:
- ./src:/app/src
- ./tests:/app/tests
- ./pyproject.toml:/app/pyproject.toml
- wikimind-data:/data
depends_on:
redis:
condition: service_healthy
docling:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-fsS", "http://127.0.0.1:7842/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
worker:
# Share the same build context/target as `gateway` so `compose up --build`
# doesn't try to pull `wikimind-dev:latest` from a registry that doesn't
# exist. BuildKit dedupes identical layers across services, so this is
# free after gateway's build completes.
build:
context: .
dockerfile: Dockerfile
target: dev
image: wikimind-dev:latest
container_name: wikimind-worker
command: uv run python -m arq wikimind.jobs.worker.WorkerSettings
environment:
WIKIMIND_DATA_DIR: /data
WIKIMIND_REDIS_URL: redis://redis:6379/0
WIKIMIND_DOCLING_SERVE_URL: http://docling:5001
UV_LINK_MODE: copy
env_file:
- path: .env
required: false
volumes:
- ./src:/app/src
- ./pyproject.toml:/app/pyproject.toml
- wikimind-data:/data
depends_on:
gateway:
condition: service_started
redis:
condition: service_healthy
docling:
condition: service_healthy
redis:
image: redis:7-alpine
container_name: wikimind-redis
ports:
- "6379:6379"
volumes:
- wikimind-redis:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 5
docling:
image: quay.io/docling-project/docling-serve-cpu:latest
container_name: wikimind-docling
ports:
- "5001:5001"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5001/health"]
interval: 30s
timeout: 10s
retries: 3
restart: unless-stopped
volumes:
wikimind-data:
wikimind-redis: