-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
93 lines (88 loc) · 2.96 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
93 lines (88 loc) · 2.96 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
# Development overrides (loose resources + hot-reload + compose watch for debugging)
# Compose Watch syncs source code into containers with better granularity than
# bind mounts (ignores __pycache__/, .venv/, etc.). uvicorn --reload / Streamlit
# poll watcher restart the process on file change automatically.
# Dependency file changes (pyproject.toml, uv.lock) trigger a full image rebuild.
# Usage: docker compose -f docker-compose.yml -f docker-compose.dev.yml up --watch
services:
db:
volumes:
# Named volume so `docker compose down` (without `-v`) preserves Postgres
# data across restarts — lets local data accumulate for indexing/
# perf-tuning practice instead of resetting to empty on every `up`.
# Dev-only: the base docker-compose.yml stays cloud-deploy-ready, where
# a managed Postgres (Azure Flexible Server / RDS) owns persistence.
- postgres_data:/var/lib/postgresql/data
deploy:
resources:
reservations:
cpus: '0.5'
memory: '512M'
limits:
cpus: '2.0' # Generous for debugging
memory: '2G' # No memory pressure
inference-db:
volumes:
# Same rationale as db's postgres_data above — dev-only persistence.
- inference_postgres_data:/var/lib/postgresql/data
deploy:
resources:
reservations:
cpus: '0.1'
memory: '128M'
limits:
cpus: '1.0' # Generous for debugging
memory: '512M'
ingestor:
command: >
sh -c "alembic upgrade head && uvicorn services.ingestor.main:app
--host 0.0.0.0 --port 8000 --reload"
develop:
watch:
- action: sync
path: ./services/ingestor
target: /app/services/ingestor
ignore:
- __pycache__/
- action: sync
path: ./libs
target: /app/libs
ignore:
- __pycache__/
- action: rebuild
path: pyproject.toml
- action: rebuild
path: uv.lock
deploy:
resources:
reservations:
cpus: '0.25'
memory: '256M'
limits:
cpus: '2.0' # Generous for debugging
memory: '1G' # Can grow during profiling
dashboard:
command: >
streamlit run services/dashboard/ui/streamlit/app.py
--server.port=8501 --server.address=0.0.0.0
--server.headless=true --server.fileWatcherType=poll
develop:
watch:
- action: sync
path: ./services/dashboard
target: /app/services/dashboard
ignore:
- __pycache__/
- action: sync
path: ./services/__init__.py
target: /app/services/__init__.py
- action: sync
path: ./libs/contracts
target: /app/libs/contracts
ignore:
- __pycache__/
- action: rebuild
path: services/dashboard/pyproject.toml
volumes:
postgres_data:
inference_postgres_data: