-
-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathdocker-compose-dev.yml
More file actions
155 lines (146 loc) · 4.46 KB
/
Copy pathdocker-compose-dev.yml
File metadata and controls
155 lines (146 loc) · 4.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
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
services:
caddy:
image: caddy:latest
ports:
- 8000:80
volumes:
- ./caddy/data:/data/caddy
- ./Caddyfile.dev:/etc/caddy/Caddyfile
- ./public/images:/srv/images
# Maintenance landing page + toggle flag (see scripts/maintenance.sh).
- ./public/maintenance:/srv/maintenance:ro
environment:
- CADDY_AGREE=true
restart: unless-stopped
postgres:
image: postgres:18
restart: unless-stopped
environment:
POSTGRES_DB: meshinfo
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
# Postgres memory tuning — conservative defaults; size to host via .env (see POSTGRES.md).
command:
- "postgres"
- "-c"
- "shared_buffers=${PG_SHARED_BUFFERS:-256MB}"
- "-c"
- "work_mem=${PG_WORK_MEM:-8MB}"
- "-c"
- "maintenance_work_mem=${PG_MAINTENANCE_WORK_MEM:-64MB}"
- "-c"
- "effective_cache_size=${PG_EFFECTIVE_CACHE_SIZE:-1GB}"
ports:
- "5432:5432"
volumes:
# postgres:18+ stores data in a version-specific subdir; mount the
# parent (/var/lib/postgresql), not /data. See POSTGRES.md.
- meshinfo_pgdata:/var/lib/postgresql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d meshinfo"]
interval: 5s
timeout: 5s
retries: 20
start_period: 10s
mqtt:
container_name: mqtt
image: eclipse-mosquitto:latest
ports:
- 1883:1883
volumes:
- ./mosquitto/data:/mosquitto/data:rw
- ./mosquitto/config:/mosquitto/config:rw
restart: unless-stopped
frontend:
build:
context: .
dockerfile: Dockerfile.spa.dev
ports:
- 5173:5173
environment:
- VITE_API_BASE_URL=/api
- VITE_API_PROXY_TARGET=http://meshinfo:9000
- NODE_ENV=dev
restart: unless-stopped
meshinfo:
build:
context: .
dockerfile: Dockerfile
volumes:
- ./config.toml:/app/config.toml
- ./output:/app/output
- ./postgres:/app/postgres:ro
# In-app scheduled pg_dump snapshots land here ([backups] in config.toml).
- ./backups:/app/backups
ports:
- 9000:9000
environment:
- PYTHONUNBUFFERED="1"
- ALLOW_ORIGINS="*"
# Uncomment if node enrichment fails with "Name or service not known"
# (some Docker setups don't inherit host DNS for external lookups)
# dns:
# - 1.1.1.1
# - 1.0.0.1
restart: unless-stopped
depends_on:
caddy:
condition: service_started
postgres:
condition: service_healthy
mqtt:
condition: service_started
# `docker compose -f docker-compose-dev.yml --profile bake run --rm landcover-bake` — see scripts/README-landcover.md.
landcover-bake:
profiles: ["bake"]
build:
context: .
dockerfile: Dockerfile.landcover
volumes:
- ./output:/app/output
# `docker compose -f docker-compose-dev.yml --profile bake run --rm canopy-bake` — see scripts/README-canopy.md.
canopy-bake:
profiles: ["bake"]
build:
context: .
dockerfile: Dockerfile.canopy
volumes:
- ./output:/app/output
# `docker compose -f docker-compose-dev.yml --profile bake run --rm building-bake` — see scripts/README-buildings.md.
building-bake:
profiles: ["bake"]
build:
context: .
dockerfile: Dockerfile.buildings
volumes:
- ./output:/app/output
# Live network-coverage tile baker (opt-in; CPU-heavy). Start with:
# docker compose -f docker-compose-dev.yml --profile coverage up -d --build coverage-worker
# Writes tiles to ./output/coverage, which meshinfo serves at /tiles/coverage.
coverage-worker:
profiles: ["coverage"]
build:
context: .
dockerfile: Dockerfile.coverage
volumes:
- ./output:/output
environment:
- MESHINFO_URL=http://meshinfo:9000
- COVERAGE_OUTPUT_DIR=/output/coverage
- COVERAGE_RECENCY_HOURS=4
# This dev DB aggregates many regions globally — clip to California. A
# single-region deployment should remove COVERAGE_BBOX.
- COVERAGE_BBOX=-124.5,32.5,-114.1,42
- COVERAGE_WORKERS=14
# 100 m paint; router grids cap at NODE_OUTPUT=3072 (~195 m). ~4× the
# ITM cost of the 200 m default.
- COVERAGE_OUTPUT_M_PER_PX=100
# Hard cap so bakes don't soak the dev workstation; shares keep meshinfo ahead.
cpus: 16
cpu_shares: 512
restart: unless-stopped
depends_on:
meshinfo:
condition: service_started
volumes:
meshinfo_pgdata: