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:
you
2026-04-05 21:52:15 +00:00
parent 0c9fd6231e
commit 13b89bb60a
3 changed files with 9 additions and 11 deletions
-1
View File
@@ -82,7 +82,6 @@ No build step required — just run:
docker run -d --name corescope \ docker run -d --name corescope \
-p 80:80 \ -p 80:80 \
-v corescope-data:/app/data \ -v corescope-data:/app/data \
-e DISABLE_CADDY=true \
ghcr.io/kpa-clawbot/corescope:latest ghcr.io/kpa-clawbot/corescope:latest
``` ```
+1 -1
View File
@@ -160,7 +160,7 @@ func main() {
} }
if len(clients) == 0 { 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)) log.Printf("Running — %d MQTT source(s) connected", len(clients))
+8 -9
View File
@@ -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 \ docker run -d --name corescope \
-p 80:80 \ -p 80:80 \
-v corescope-data:/app/data \ -v corescope-data:/app/data \
-e DISABLE_CADDY=true \
ghcr.io/kpa-clawbot/corescope:latest ghcr.io/kpa-clawbot/corescope:latest
``` ```
@@ -65,7 +64,6 @@ docker compose up -d
|----------|---------|-------------| |----------|---------|-------------|
| `HTTP_PORT` | `80` | Host port for the web UI | | `HTTP_PORT` | `80` | Host port for the web UI |
| `DATA_DIR` | `./data` | Host path for persistent data | | `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 | | `DISABLE_MOSQUITTO` | `false` | Set `true` to use an external MQTT broker |
### Image tags ### 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_BROKER` | `mqtt://localhost:1883` | MQTT broker URL (overrides config file) |
| `MQTT_TOPIC` | `meshcore/#` | MQTT topic subscription pattern | | `MQTT_TOPIC` | `meshcore/#` | MQTT topic subscription pattern |
| `DB_PATH` | `data/meshcore.db` | SQLite database path | | `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 | | `DISABLE_MOSQUITTO` | `false` | Skip the internal Mosquitto broker |
### config.json ### 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 \ docker run -d --name corescope \
-p 80:80 -p 1883:1883 \ -p 80:80 -p 1883:1883 \
-v corescope-data:/app/data \ -v corescope-data:/app/data \
-e DISABLE_CADDY=true \
ghcr.io/kpa-clawbot/corescope:latest 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) ### 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
# nginx example # nginx example
@@ -283,14 +279,17 @@ Docker reports `healthy` or `unhealthy` automatically. The check runs every 30 s
curl -f http://localhost/api/stats 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 ```json
{ {
"totalPackets": 56234, "totalPackets": 56234,
"activeNodes": 142, "totalNodes": 142,
"uptimeSeconds": 86400, "totalObservers": 12,
"mqttConnected": true "packetsLastHour": 830,
"packetsLast24h": 19644,
"engine": "go",
"version": "v3.4.1"
} }
``` ```