-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
159 lines (152 loc) · 4.27 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
159 lines (152 loc) · 4.27 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# ============================================
# Docling Development Docker Compose
# Local development without SSL
# ============================================
services:
# ===========================================
# Nginx Reverse Proxy (No SSL)
# ===========================================
nginx:
image: nginx:1.27-alpine
container_name: docling-nginx-dev
restart: unless-stopped
ports:
- "8080:80"
volumes:
- ./nginx/nginx-dev.conf:/etc/nginx/nginx.conf:ro
depends_on:
- api
networks:
- docling-dev-network
# ===========================================
# Docling API Service (Development)
# ===========================================
api:
build:
context: ./app
dockerfile: Dockerfile.dev
image: docling-api:dev
container_name: docling-api-dev
restart: unless-stopped
command: api
environment:
- ENV=development
- PORT=8000
- WORKERS=1
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_PASSWORD=
- DOCLING_API_TOKEN=${DOCLING_API_TOKEN:-dev-token-123}
- EMBEDDING_MODEL=${EMBEDDING_MODEL:-sentence-transformers/all-MiniLM-L6-v2}
- CORS_ORIGINS=http://localhost:8080,http://localhost:3000,http://127.0.0.1:8080
volumes:
# Mount source code for hot reload
- ./app:/app:cached
- docling-temp-dev:/tmp/docling_downloads
- docling-uploads-dev:/tmp/docling_uploads
- model-cache-dev:/root/.cache
- easyocr-cache-dev:/root/.easyocr
ports:
# Expose API directly for debugging
- "8000:8000"
depends_on:
redis:
condition: service_healthy
networks:
- docling-dev-network
# ===========================================
# Celery Worker for Document Processing
# ===========================================
worker:
image: docling-api:dev
container_name: docling-worker-dev
restart: unless-stopped
command: worker
environment:
- ENV=development
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_PASSWORD=
- CELERY_CONCURRENCY=1
- CELERY_QUEUE=docling
- CELERY_LOGLEVEL=debug
- PRELOAD_MODELS=${PRELOAD_MODELS:-false}
- EMBEDDING_MODEL=${EMBEDDING_MODEL:-sentence-transformers/all-MiniLM-L6-v2}
volumes:
# Mount source code for hot reload
- ./app:/app:cached
- docling-temp-dev:/tmp/docling_downloads
- docling-uploads-dev:/tmp/docling_uploads
- model-cache-dev:/root/.cache
- easyocr-cache-dev:/root/.easyocr
depends_on:
api:
condition: service_started
redis:
condition: service_healthy
networks:
- docling-dev-network
# ===========================================
# Redis - Task Queue & Cache
# ===========================================
redis:
image: redis:7-alpine
container_name: docling-redis-dev
restart: unless-stopped
command: redis-server --appendonly yes --maxmemory 256mb --maxmemory-policy volatile-lru
ports:
# Expose Redis for debugging
- "6379:6379"
volumes:
- redis-data-dev:/data
networks:
- docling-dev-network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 3
# ===========================================
# Flower - Celery Monitoring (Always on in dev)
# ===========================================
flower:
image: docling-api:dev
container_name: docling-flower-dev
restart: unless-stopped
command: flower
environment:
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_PASSWORD=
- FLOWER_PORT=5555
- FLOWER_USER=admin
- FLOWER_PASSWORD=admin
ports:
- "5555:5555"
depends_on:
api:
condition: service_started
redis:
condition: service_healthy
networks:
- docling-dev-network
# ===========================================
# Networks
# ===========================================
networks:
docling-dev-network:
driver: bridge
# ===========================================
# Volumes
# ===========================================
volumes:
redis-data-dev:
driver: local
docling-temp-dev:
driver: local
docling-uploads-dev:
driver: local
model-cache-dev:
driver: local
easyocr-cache-dev:
driver: local