mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-04-09 12:55:40 +00:00
fix: remove nonexistent DISABLE_CADDY env var, fix /api/stats example, improve MQTT error message
- DISABLE_CADDY was referenced in docs/README but never implemented in the entrypoint — removed from all docker run examples and config tables - /api/stats health check example showed fields (mqttConnected, uptimeSeconds, activeNodes) that don't exist in the actual API response - MQTT fatal error now includes actionable hints (check broker, set MQTT_BROKER, or configure mqttSources)
This commit is contained in:
@@ -82,7 +82,6 @@ No build step required — just run:
|
||||
docker run -d --name corescope \
|
||||
-p 80:80 \
|
||||
-v corescope-data:/app/data \
|
||||
-e DISABLE_CADDY=true \
|
||||
ghcr.io/kpa-clawbot/corescope:latest
|
||||
```
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@ func main() {
|
||||
}
|
||||
|
||||
if len(clients) == 0 {
|
||||
log.Fatal("no MQTT connections established")
|
||||
log.Fatal("no MQTT connections established — check broker is running (default: mqtt://localhost:1883). Set MQTT_BROKER env var or configure mqttSources in config.json")
|
||||
}
|
||||
|
||||
log.Printf("Running — %d MQTT source(s) connected", len(clients))
|
||||
|
||||
@@ -37,7 +37,6 @@ CoreScope runs well on Raspberry Pi 4/5 (ARM64). The Go server uses ~300 MB RAM
|
||||
docker run -d --name corescope \
|
||||
-p 80:80 \
|
||||
-v corescope-data:/app/data \
|
||||
-e DISABLE_CADDY=true \
|
||||
ghcr.io/kpa-clawbot/corescope:latest
|
||||
```
|
||||
|
||||
@@ -65,7 +64,6 @@ docker compose up -d
|
||||
|----------|---------|-------------|
|
||||
| `HTTP_PORT` | `80` | Host port for the web UI |
|
||||
| `DATA_DIR` | `./data` | Host path for persistent data |
|
||||
| `DISABLE_CADDY` | `false` | Set `true` when behind a reverse proxy |
|
||||
| `DISABLE_MOSQUITTO` | `false` | Set `true` to use an external MQTT broker |
|
||||
|
||||
### Image tags
|
||||
@@ -112,7 +110,6 @@ CoreScope uses a layered configuration system (highest priority wins):
|
||||
| `MQTT_BROKER` | `mqtt://localhost:1883` | MQTT broker URL (overrides config file) |
|
||||
| `MQTT_TOPIC` | `meshcore/#` | MQTT topic subscription pattern |
|
||||
| `DB_PATH` | `data/meshcore.db` | SQLite database path |
|
||||
| `DISABLE_CADDY` | `false` | Skip the internal Caddy reverse proxy |
|
||||
| `DISABLE_MOSQUITTO` | `false` | Skip the internal Mosquitto broker |
|
||||
|
||||
### config.json
|
||||
@@ -151,7 +148,6 @@ The built-in Mosquitto broker listens on port 1883 inside the container. Point y
|
||||
docker run -d --name corescope \
|
||||
-p 80:80 -p 1883:1883 \
|
||||
-v corescope-data:/app/data \
|
||||
-e DISABLE_CADDY=true \
|
||||
ghcr.io/kpa-clawbot/corescope:latest
|
||||
```
|
||||
|
||||
@@ -217,7 +213,7 @@ MeshCore gateways typically publish to `meshcore/<gateway>/<region>/packets`. Th
|
||||
|
||||
### Option 1: External reverse proxy (recommended)
|
||||
|
||||
Run CoreScope with `DISABLE_CADDY=true` and place nginx, Traefik, or Cloudflare Tunnel in front:
|
||||
Run CoreScope behind nginx, Traefik, or Cloudflare Tunnel for TLS termination:
|
||||
|
||||
```nginx
|
||||
# nginx example
|
||||
@@ -283,14 +279,17 @@ Docker reports `healthy` or `unhealthy` automatically. The check runs every 30 s
|
||||
curl -f http://localhost/api/stats
|
||||
```
|
||||
|
||||
Returns JSON with packet counts, node counts, and uptime:
|
||||
Returns JSON with packet counts, node counts, and version info:
|
||||
|
||||
```json
|
||||
{
|
||||
"totalPackets": 56234,
|
||||
"activeNodes": 142,
|
||||
"uptimeSeconds": 86400,
|
||||
"mqttConnected": true
|
||||
"totalNodes": 142,
|
||||
"totalObservers": 12,
|
||||
"packetsLastHour": 830,
|
||||
"packetsLast24h": 19644,
|
||||
"engine": "go",
|
||||
"version": "v3.4.1"
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user