App factory, data model, initial migration and HTTP metrics
- Flask app factory with env-driven config (.env loaded at import) - SQLAlchemy models: users, API apps, UI tokens, Last.fm auth tokens, sessions, scrobbles (deduplicated) and now-playing - Initial Alembic migration; CI checks migrations match the models - Prometheus metric definitions, per-endpoint RED hooks with bounded labels, and a standalone metrics server - docker compose Postgres with a test database; CI test job runs against a Postgres service container Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
606348800b
commit
98c8f2e824
21 files changed
+1777
-6
No files matched your search
@@ -0,0 +1,14 @@
|
||||
# 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
|
||||
Reference in new issue
Block a user