forked from MeshAddicts/meshinfo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-dev.yml
More file actions
124 lines (116 loc) · 3.39 KB
/
docker-compose-dev.yml
File metadata and controls
124 lines (116 loc) · 3.39 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
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
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
volumes:
meshinfo_pgdata: