-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
69 lines (66 loc) · 2.46 KB
/
docker-compose.yml
File metadata and controls
69 lines (66 loc) · 2.46 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
# DevForge local stack — control plane + frontend with hot-reload.
#
# Bring up: `make dev` (or: `docker compose up`)
# Tail logs: `make logs` (or: `docker compose logs -f`)
# Bring down: `make stop` (or: `docker compose down`)
# Reset state: `make clean` (compose down -v && rm -rf data/)
services:
control-plane:
build:
context: .
dockerfile: Dockerfile.local
container_name: devforge-control-plane
ports:
- "8001:8001"
env_file:
- .env.local
environment:
DEVFORGE_BACKEND: local
# uvicorn re-emits this so the worker subprocess inherits the right
# callback URL when it httpx.gets back into the control plane.
CONTROL_PLANE_API: http://localhost:8001
volumes:
# Source — live-edit Python.
- ./backend:/app/backend
- ./scripts:/app/scripts
- ./pyproject.toml:/app/pyproject.toml
- ./uv.lock:/app/uv.lock
# Persistent state visible from host.
- ./data:/app/data
- ./secrets:/app/secrets:ro
# Named volume for .venv — populated by boot-time `uv sync`; survives
# container restarts so we don't redo the install on every `make dev`.
- cp_venv:/app/.venv
# uv's package cache — persists wheel downloads across container
# rebuilds. Without this, every fresh `cp_venv` would re-download
# ~1.5 GB from PyPI. With this, subsequent installs are wheel-fast.
- uv_cache:/root/.cache/uv
frontend:
build:
context: ./frontend
dockerfile: Dockerfile.local
container_name: devforge-frontend
ports:
- "3000:3000"
env_file:
- ./frontend/.env.local
volumes:
- ./frontend:/app
# Host's node_modules is masked by this named volume — keeps platform-
# specific binaries (esbuild, sharp) from conflicting.
- frontend_node_modules:/app/node_modules
# npm's tarball cache — persists across container rebuilds so first
# `npm install` after a `frontend_node_modules` reset is wheel-fast.
- npm_cache:/root/.npm
# Anonymous volume for .next so Turbopack's build cache stays isolated
# in the container AND is wiped on every `compose down`. (A named volume
# accumulates stale dynamic-route module entries across restarts and
# surfaces as "PageNotFoundError: Cannot find module for page".)
- /app/.next
depends_on:
- control-plane
volumes:
cp_venv:
uv_cache:
frontend_node_modules:
npm_cache: