-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
100 lines (95 loc) · 3.04 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
100 lines (95 loc) · 3.04 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
services:
app:
build:
context: .
target: base # Stop at dependency stage
container_name: meshrf_dev
command: npm run dev -- --host
ports:
- "3100:5173" # Vite Dev Port
volumes:
- .:/app
- /app/node_modules
environment:
# The dev server is Vite, which only exposes VITE_-prefixed variables to
# the browser. These are mapped from the same unprefixed names used by
# docker-compose.yml and .env, so one .env drives both stacks.
- VITE_DEFAULT_MAP_STYLE=${DEFAULT_MAP_STYLE:-dark_green}
- VITE_DEFAULT_UNITS=${DEFAULT_UNITS:-imperial}
- VITE_MAP_LAT=${MAP_LAT:-45.5152}
- VITE_MAP_LNG=${MAP_LNG:--122.6784}
- VITE_MAP_ZOOM=${MAP_ZOOM:-13}
# Deliberately NOT VITE_-prefixed: a VITE_ variable is inlined into the
# client bundle. vite.config.js reads this in Node and appends it to
# proxied tile requests, so the key stays server-side.
- CARTO_API_KEY=${CARTO_API_KEY:-}
- ALLOWED_HOSTS=${ALLOWED_HOSTS:-}
- API_TARGET=http://rf-engine:5001
restart: unless-stopped
networks:
- meshrf_net
rf-engine:
build: ./rf-engine
container_name: rf_engine_dev
ports:
- "5001:5001" # Expose to host for local dev
# Overlay dev volumes for Python hot-reloading
volumes:
- ./rf-engine:/app
- ./cache:/app/cache
# Run uvicorn with reload
command: ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "5001", "--reload"]
environment:
- ELEVATION_API_URL=http://opentopodata:5000
- ELEVATION_DATASET=${ELEVATION_DATASET:-ned10m}
- REDIS_PASSWORD=${REDIS_PASSWORD:-changeme}
depends_on:
- redis
restart: unless-stopped
networks:
- meshrf_net
rf-worker:
build: ./rf-engine
container_name: rf_worker_dev
# Overlay dev volumes for hot-reloading code in worker
volumes:
- ./rf-engine:/app
- ./cache:/app/cache
# Celery worker with autoreload (using watchdog if available, otherwise just worker)
# Using normal worker for now, manual restart needed for deep logic changes if watchdog not set up
command: celery -A worker.celery_app worker --loglevel=info
environment:
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_PASSWORD=${REDIS_PASSWORD:-changeme}
- ELEVATION_API_URL=http://opentopodata:5000
- ELEVATION_DATASET=${ELEVATION_DATASET:-ned10m}
depends_on:
- rf-engine
- redis
restart: unless-stopped
networks:
- meshrf_net
redis:
image: redis:alpine
user: nobody
command: redis-server --requirepass ${REDIS_PASSWORD:-changeme}
volumes:
- ./redis_data:/data
restart: always
networks:
- meshrf_net
opentopodata:
build:
context: ./opentopodata
dockerfile: docker/Dockerfile
container_name: opentopodata_dev
volumes:
- ./data/opentopodata:/app/data:ro
- ./data/opentopodata/config.yaml:/app/config.yaml:ro
restart: unless-stopped
networks:
- meshrf_net
networks:
meshrf_net:
driver: bridge