- scrobbler.federation with init_app() as its only entry point, called from create_app(); does nothing unless FEDERATION_ENABLED - FederationConfig validates FEDERATION_DOMAIN (bare host) and FEDERATION_BASE_URL (https) when enabled, with clear errors - federation/protocol/ package for pure, framework-free protocol code - Package README with the boundary rules, configuration and migration workflow; .env.example lists the settings (off) - Alembic: existing history labelled `core`; new empty `federation` branch root (depends on the core users table). Everything upgrades `heads` (entrypoint, CI, tests); tests check both branches apply and that federation can be removed without touching core Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MK52BGoJbPhZ1vSFuKcGUW
30 lines
990 B
Bash
30 lines
990 B
Bash
# Copy to .env for local development.
|
|
# Host port docker compose publishes Postgres on.
|
|
DB_PORT=5432
|
|
DATABASE_URL=postgresql+psycopg://scrobbler:scrobbler@localhost:5432/scrobbler
|
|
TEST_DATABASE_URL=postgresql+psycopg://scrobbler:scrobbler@localhost:5432/scrobbler_test
|
|
SECRET_KEY=change-me
|
|
|
|
# Origin(s) of the static UI allowed to call /api/v1 (comma separated).
|
|
CORS_ORIGINS=http://localhost:8080
|
|
# Where Last.fm clients are redirected to approve desktop auth tokens.
|
|
UI_BASE_URL=http://localhost:8080
|
|
|
|
# Prometheus metrics are served on a separate port.
|
|
METRICS_PORT=9100
|
|
|
|
# Set to allow importing history straight from Last.fm (https://www.last.fm/api/account/create).
|
|
LASTFM_API_KEY=
|
|
|
|
# docker compose host ports (defaults shown)
|
|
API_PORT=5050
|
|
UI_PORT=8080
|
|
PROMETHEUS_PORT=9090
|
|
GRAFANA_PORT=3000
|
|
GRAFANA_ADMIN_PASSWORD=admin
|
|
|
|
# ActivityPub federation (in development; off by default). See src/scrobbler/federation/README.md.
|
|
FEDERATION_ENABLED=0
|
|
FEDERATION_DOMAIN=
|
|
FEDERATION_BASE_URL=
|