forked from scub-france/Docling-Studio
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
110 lines (104 loc) · 3.15 KB
/
docker-compose.dev.yml
File metadata and controls
110 lines (104 loc) · 3.15 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
# =============================================================================
# Docling Studio — Development stack
#
# Usage:
# docker compose -f docker-compose.dev.yml up
#
# Includes OpenSearch single-node + Dashboards for search/sync features.
# Frontend runs Vite dev server with HMR, backend runs with --reload.
# =============================================================================
services:
# --- OpenSearch (single-node, security disabled for local dev) ---
opensearch:
image: opensearchproject/opensearch:2
environment:
discovery.type: single-node
DISABLE_SECURITY_PLUGIN: "true"
OPENSEARCH_JAVA_OPTS: "-Xms512m -Xmx512m"
ports:
- "9200:9200"
volumes:
- opensearch_data:/usr/share/opensearch/data
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:9200/_cluster/health || exit 1"]
interval: 10s
timeout: 5s
retries: 10
# --- OpenSearch Dashboards (index inspection UI) ---
opensearch-dashboards:
image: opensearchproject/opensearch-dashboards:2
environment:
OPENSEARCH_HOSTS: '["http://opensearch:9200"]'
DISABLE_SECURITY_DASHBOARDS_PLUGIN: "true"
ports:
- "5601:5601"
depends_on:
opensearch:
condition: service_healthy
# --- Embedding service (sentence-transformers) ---
embedding:
build:
context: ./embedding-service
ports:
- "8001:8001"
environment:
EMBEDDING_MODEL: ${EMBEDDING_MODEL:-all-MiniLM-L6-v2}
EMBEDDING_BATCH_SIZE: ${EMBEDDING_BATCH_SIZE:-64}
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:8001/health || exit 1"]
interval: 10s
timeout: 5s
retries: 10
deploy:
resources:
limits:
memory: 2g
# --- Backend (FastAPI with hot-reload) ---
document-parser:
build:
context: ./document-parser
target: ${CONVERSION_MODE:-local}
ports:
- "8000:8000"
volumes:
- ./document-parser:/app
- uploads_data:/app/uploads
- db_data:/app/data
environment:
CORS_ORIGINS: ${CORS_ORIGINS:-http://localhost:3000,http://localhost:5173}
DOCLING_SERVE_URL: ${DOCLING_SERVE_URL:-}
DOCLING_SERVE_API_KEY: ${DOCLING_SERVE_API_KEY:-}
RATE_LIMIT_RPM: ${RATE_LIMIT_RPM:-100}
MAX_FILE_SIZE_MB: ${MAX_FILE_SIZE_MB:-50}
BATCH_PAGE_SIZE: ${BATCH_PAGE_SIZE:-10}
OPENSEARCH_URL: http://opensearch:9200
EMBEDDING_URL: http://embedding:8001
command: ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
depends_on:
opensearch:
condition: service_healthy
embedding:
condition: service_healthy
deploy:
resources:
limits:
memory: 4g
# --- Frontend (Vite dev server with HMR) ---
frontend:
image: node:20-alpine
working_dir: /app
ports:
- "3000:3000"
volumes:
- ./frontend:/app
- frontend_node_modules:/app/node_modules
environment:
VITE_APP_VERSION: dev
command: ["sh", "-c", "npm install && npm run dev -- --host"]
depends_on:
- document-parser
volumes:
opensearch_data:
uploads_data:
db_data:
frontend_node_modules: