/metrics shared the web server's threads, and answered after a token lookup and three counting queries, so a pool run dry, one of the things it is there to show, would have stalled it, and a slow scrape held a web thread. Now [web] metrics_bind starts a listener on its own OS thread with a current-thread runtime, reading only what is in memory: pool counts, channel capacity, the daemon runtime's metrics through its handle, /proc. No sign-in, as exporters have none; publish the port to the LAN only. The feed, pending and downloaded counts stay with the healthcheck's log lines, which the dashboard already reads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
35 lines
1.3 KiB
YAML
35 lines
1.3 KiB
YAML
services:
|
|
ipx:
|
|
image: 192.168.1.130:5000/ipx:latest
|
|
container_name: iPX
|
|
restart: unless-stopped
|
|
environment:
|
|
PUID: "99"
|
|
PGID: "100"
|
|
TZ: "America/Toronto"
|
|
IPX_LOG: "ipx=info"
|
|
# One JSON object a line, which Loki (through Alloy) and the Grafana dashboard read.
|
|
IPX_LOG_FORMAT: "json"
|
|
# Traces to Tempo, in the monitoring project; ipx sends none without it.
|
|
OTEL_EXPORTER_OTLP_ENDPOINT: "http://192.168.1.130:4318"
|
|
# What the dashboard filters on, so a daemon run by hand for testing stays out of it.
|
|
OTEL_RESOURCE_ATTRIBUTES: "deployment.environment.name=production"
|
|
# IPX_DATABASE_URL=postgres://... to use Postgres; without it, /data/state.db (SQLite).
|
|
env_file:
|
|
- ipx.env # relative: Arcane resolves it inside its own container
|
|
ports:
|
|
- "8099:8099" # web UI
|
|
- "192.168.1.130:9187:9187" # /metrics for Prometheus, LAN only (ipx#194)
|
|
- "6881:6881/tcp" # BitTorrent peers
|
|
- "6881:6881/udp" # DHT
|
|
volumes:
|
|
- /mnt/fast/appdata/ipx:/config # config.toml, and the web token
|
|
- /mnt/user/ipx/:/data # state.db
|
|
- /mnt/user/ipx/downloads:/downloads
|
|
healthcheck:
|
|
test: ["CMD", "ipx", "status"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 10s
|