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,20 @@
|
||||
services:
|
||||
db:
|
||||
image: postgres:16
|
||||
environment:
|
||||
POSTGRES_USER: scrobbler
|
||||
POSTGRES_PASSWORD: scrobbler
|
||||
POSTGRES_DB: scrobbler
|
||||
ports:
|
||||
- "${DB_PORT:-5432}:5432"
|
||||
volumes:
|
||||
- db-data:/var/lib/postgresql/data
|
||||
- ./deploy/postgres/init-test-db.sql:/docker-entrypoint-initdb.d/init-test-db.sql:ro
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U scrobbler"]
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 10
|
||||
|
||||
volumes:
|
||||
db-data:
|
||||
Reference in new issue
Block a user