-
-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
133 lines (124 loc) · 3.54 KB
/
docker-compose.yml
File metadata and controls
133 lines (124 loc) · 3.54 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
services:
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
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
meshinfo:
image: ghcr.io/meshaddicts/meshinfo:latest
volumes:
- ./config.toml:/app/config.toml
- ./output:/app/output
- ./postgres:/app/postgres:ro
environment:
- PYTHONUNBUFFERED=1
# 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
ports:
- 9000:9000
restart: unless-stopped
# Wait for Postgres readiness, not just container start.
depends_on:
postgres:
condition: service_healthy
mqtt:
condition: service_started
healthcheck:
test: ["CMD-SHELL", "python3 -c 'import urllib.request,sys; sys.exit(0 if urllib.request.urlopen(\"http://localhost:9000/\", timeout=3).status==200 else 1)'"]
interval: 30s
timeout: 5s
retries: 3
start_period: 30s
frontend:
image: ghcr.io/meshaddicts/meshinfo-spa:latest
ports:
- 8000:80
env_file:
- path: ./frontend/.env
required: false
environment:
NODE_ENV: production
restart: unless-stopped
caddy:
build:
context: .
dockerfile: Dockerfile.caddy
ports:
- 80:80
- 443:443
volumes:
- ./caddy/data:/data/caddy
- ./Caddyfile:/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
depends_on:
meshinfo:
condition: service_healthy
frontend:
condition: service_started
# `docker compose --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 --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 --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: