LibrePortal/containers/speedtest/docker-compose.yml
librelad a86c142e74 fix(backup): honest failures, rootless docker in capture paths, speedtest key capture
- backup_files.sh / backup_db.sh: every docker exec/run in the capture,
  sidecar-discovery, rehydrate and DB-import paths now goes through
  runFileOp — bare docker can't reach the rootless daemon socket, which
  made live capture fail (and silently bounce containers) on every
  rootless install, and would have broken DB restores the same way.
- capture/rehydrate stderr is kept and printed on failure instead of
  being discarded, with a clear message when the image has no tar.
- backup_app_start.sh: when no location produced a complete snapshot the
  backup now returns 1 — the task is marked failed instead of logging a
  nonexistent/incomplete backup as a success and skipping verification.
- restic engine: on restic exit 3 the orphan incomplete snapshot is
  called out explicitly so nobody restores it believing it is whole.
- speedtest: capture /config through the container (root-owned TLS key
  and logrotate state are unreadable from the host), which also flips
  its auto strategy to live — no more container stop per backup.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-21 00:31:46 +01:00

58 lines
3.0 KiB
YAML

networks:
DOCKER_NETWORK_DATA: #LIBREPORTAL|DOCKER_NETWORK_TAG|DOCKER_NETWORK_DATA
external: true
services:
speedtest-service: #LIBREPORTAL|SERVICE_TAG_1|speedtest-service
container_name: speedtest-service
image: lscr.io/linuxserver/librespeed:latest #LIBREPORTAL|SPEEDTEST_VERSION_TAG|latest
restart: unless-stopped
hostname: speedtest
# LinuxServer.io build of LibreSpeed — same software, maintained. Their
# images take PUID/PGID (matching the other LSIO app in the catalogue,
# bookstack) and keep everything under /config. MODE, WEBPORT and
# ENABLE_ID_OBFUSCATION have no equivalent here: this image is standalone
# by design and always serves on 80 internally.
environment:
- PUID=1000
- PGID=1000
- TZ=TIMEZONE_DATA #LIBREPORTAL|TIMEZONE_TAG|TIMEZONE_DATA
# Guards the results page at /results/stats.php, same as before.
- PASSWORD=SPEEDTEST_PASSWORD_1_DATA #LIBREPORTAL|SPEEDTEST_PASSWORD_1_TAG|SPEEDTEST_PASSWORD_1_DATA
# Setting a DB type is what turns telemetry on. DB_NAME is deliberately
# left unset so the image picks its own path inside /config — guessing one
# risks a database that silently is not persisted by the volume below.
- DB_TYPE=sqlite
# GLUETUN_OFF_BEGIN
ports:
- "PORTS_DATA_1" #LIBREPORTAL|PORTS_TAG_1|PORTS_DATA_1
# GLUETUN_OFF_END
labels:
libreportal.category: "CATEGORY_DATA" #LIBREPORTAL|CATEGORY_TAG|CATEGORY_DATA
libreportal.title: "TITLE_DATA" #LIBREPORTAL|TITLE_TAG|TITLE_DATA
# /config holds root-and-app-owned files (TLS key, logs) the backup user
# can't read from the host; capture them through the container instead.
libreportal.backup.files: "speedtest-service:/config:config"
traefik.enable: TRAEFIK_ENABLE_DATA #LIBREPORTAL|TRAEFIK_ENABLE_TAG|TRAEFIK_ENABLE_DATA
# TRAEFIK_PORT_1_BEGIN
traefik.http.routers.speedtest-service.entrypoints: web,websecure
traefik.http.routers.speedtest-service.rule: Host(`DOMAINSUBNAME_DATA_1`) #LIBREPORTAL|DOMAINSUBNAME_TAG_1|DOMAINSUBNAME_DATA_1
traefik.http.routers.speedtest-service.tls: true
traefik.http.routers.speedtest-service.tls.certresolver: production
traefik.http.services.speedtest-service.loadbalancer.server.port: PORT_INTERNAL_DATA_1 #LIBREPORTAL|PORT_INTERNAL_TAG_1|PORT_INTERNAL_DATA_1
traefik.http.routers.speedtest-service.middlewares: MIDDLEWARE_DATA_1 #LIBREPORTAL|MIDDLEWARE_TAG_1|MIDDLEWARE_DATA_1
# TRAEFIK_PORT_1_END
healthcheck:
disable: HEALTHCHECK_DATA #LIBREPORTAL|HEALTHCHECK_TAG|HEALTHCHECK_DATA
volumes:
- SOCKET_DATA #LIBREPORTAL|SOCKET_TAG|SOCKET_DATA
- ./config:/config
# GLUETUN_OFF_BEGIN
networks:
DOCKER_NETWORK_DATA: #LIBREPORTAL|DOCKER_NETWORK_TAG|DOCKER_NETWORK_DATA
ipv4_address: IP_DATA_1 #LIBREPORTAL|IP_TAG_1|IP_DATA_1
# GLUETUN_OFF_END
# GLUETUN_ON_BEGIN
# network_mode: "container:gluetun-service"
# GLUETUN_ON_END