ro changes
This commit is contained in:
@@ -9,7 +9,7 @@ Three Docker containers sharing a named volume (`speed-logger_sqlite-data`) that
|
|||||||
- **speedtest** (`measurement/`) — Python + cron inside a Debian slim container. Runs measurements and writes results to SQLite.
|
- **speedtest** (`measurement/`) — Python + cron inside a Debian slim container. Runs measurements and writes results to SQLite.
|
||||||
- **ping** — Same image, runs `run_ping.py` as a long-lived loop (not cron) with `network_mode: host` so it can reach the LAN gateway. Pings the gateway plus a rotating pool of external DNS-resolver IPs every `PING_INTERVAL` (5s) and writes to `ping_checks`.
|
- **ping** — Same image, runs `run_ping.py` as a long-lived loop (not cron) with `network_mode: host` so it can reach the LAN gateway. Pings the gateway plus a rotating pool of external DNS-resolver IPs every `PING_INTERVAL` (5s) and writes to `ping_checks`.
|
||||||
- **control** — Same image, runs `control.py`: a stdlib `http.server` page on port 80 (host port `CONTROL_PORT`) where household members toggle speedtests on/off from a phone. Writes the flag to the `settings` table; talks to humans only, never to other containers.
|
- **control** — Same image, runs `control.py`: a stdlib `http.server` page on port 80 (host port `CONTROL_PORT`) where household members toggle speedtests on/off from a phone. Writes the flag to the `settings` table; talks to humans only, never to other containers.
|
||||||
- **grafana** — Stock Grafana image with the `frser-sqlite-datasource` plugin. Reads from the shared SQLite volume. Dashboard and datasource are provisioned automatically from `grafana/provisioning/`. Anonymous read-only access is enabled (`GF_AUTH_ANONYMOUS_*`); because any viewer can POST arbitrary SQL to Grafana's datasource query API, the volume is mounted `:ro` and the datasource path uses `?mode=ro`. Do not remove either when touching the compose file. This also means the DB must stay in the default rollback journal mode — WAL would require write access to the directory even for readers.
|
- **grafana** — Stock Grafana image with the `frser-sqlite-datasource` plugin. Reads from the shared SQLite volume. Dashboard and datasource are provisioned automatically from `grafana/provisioning/`. Anonymous read-only access is enabled (`GF_AUTH_ANONYMOUS_*`); because any viewer can POST arbitrary SQL to Grafana's datasource query API, the volume is mounted `:ro` and the datasource sets `pathOptions: mode=ro`. Do not remove either when touching the compose file. This also means the DB must stay in the default rollback journal mode — WAL would require write access to the directory even for readers.
|
||||||
|
|
||||||
No message queues, no ORM, no external services. Everything is plain Python stdlib + subprocess calls.
|
No message queues, no ORM, no external services. Everything is plain Python stdlib + subprocess calls.
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,9 @@ datasources:
|
|||||||
access: proxy
|
access: proxy
|
||||||
isDefault: true
|
isDefault: true
|
||||||
jsonData:
|
jsonData:
|
||||||
|
path: /data/speedtest.db
|
||||||
# mode=ro because any Grafana viewer (incl. anonymous) can send arbitrary
|
# mode=ro because any Grafana viewer (incl. anonymous) can send arbitrary
|
||||||
# SQL to the datasource API; together with the :ro volume mount this
|
# SQL to the datasource API; together with the :ro volume mount this
|
||||||
# keeps the database safe from writes through Grafana.
|
# keeps the database safe from writes through Grafana.
|
||||||
path: /data/speedtest.db?mode=ro
|
pathOptions: mode=ro
|
||||||
editable: true
|
editable: true
|
||||||
|
|||||||
Reference in New Issue
Block a user