Import page in the web UI, worker service and import monitoring
CI / validate-monitoring (push) Successful in 7s
CI / lint (push) Successful in 11s
CI / test (push) Successful in 43s
CI / images (push) Skipped
CI / assets (push) Skipped
CI / python-package (push) Skipped
CI / notify (push) Successful in 5s

- New Import page: upload an export (with upload progress) or, when the
  server has a Last.fm API key, import straight from a Last.fm username;
  jobs list with live progress, counts, errors and cancelling
- docker compose runs the import worker from the API image; the API
  image no longer sets PROMETHEUS_MULTIPROC_DIR (gunicorn.conf.py does,
  and other commands must not inherit multiprocess mode)
- Prometheus scrapes the worker; Usage dashboard gains an Imports row;
  ImportWorkerDown and ImportJobsWaiting alerts
- README and .env.example document imports and LASTFM_API_KEY

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MK52BGoJbPhZ1vSFuKcGUW
This commit is contained in:
mattandClaude Opus 5.5 committed 2026-09-25 15:10:15 +01:00
1 parent eebd7b8730
commit e40a074a64
12 files changed
+754 -3

No files matched your search

+22 -1
View File
@@ -1,4 +1,4 @@
# Core services: docker compose up
# Core services: docker compose up (db, api, worker, ui)
# With monitoring: docker compose --profile monitoring up
# Published images: SCROBBLER_IMAGE_TAG=main docker compose up --no-build
name: scrobbler
@@ -33,6 +33,7 @@ services:
UI_BASE_URL: ${UI_BASE_URL:-http://localhost:8080}
WEB_CONCURRENCY: ${WEB_CONCURRENCY:-2}
FORWARDED_ALLOW_IPS: "*"
LASTFM_API_KEY: ${LASTFM_API_KEY:-}
ports:
- "${API_PORT:-5050}:8000"
expose:
@@ -41,6 +42,26 @@ services:
db:
condition: service_healthy
# Processes history imports (uploaded exports and pulls from Last.fm).
worker:
image: ${SCROBBLER_REGISTRY:-pkgs.daubney.dev/scrobbler}/scrobbler-api:${SCROBBLER_IMAGE_TAG:-local}
build:
context: .
dockerfile: docker/api.Dockerfile
command: ["flask", "--app", "scrobbler", "imports", "worker"]
environment:
DATABASE_URL: postgresql+psycopg://scrobbler:${POSTGRES_PASSWORD:-scrobbler}@db:5432/scrobbler
SECRET_KEY: ${SECRET_KEY:-change-me}
LASTFM_API_KEY: ${LASTFM_API_KEY:-}
RUN_MIGRATIONS: "0" # the api service applies them
expose:
- "9101" # metrics: internal network only
healthcheck:
disable: true
depends_on:
api:
condition: service_healthy
ui:
image: ${SCROBBLER_REGISTRY:-pkgs.daubney.dev/scrobbler}/scrobbler-ui:${SCROBBLER_IMAGE_TAG:-local}
build: