Files
Scrobbler/.env.example
T
mattandClaude Sonnet 5.5 c55a6596d0
CI / validate-monitoring (push) Successful in 8s
CI / lint (push) Successful in 16s
CI / federation-interop (push) Successful in 1m40s
CI / test (push) Successful in 4m48s
CI / images (push) Skipped
CI / assets (push) Skipped
CI / python-package (push) Skipped
CI / trigger-deploy (push) Skipped
CI / notify (push) Successful in 5s
Add uploaded profile images (SCR-1)
Users can upload, fetch and remove a profile image at /api/v1/me/avatar. The
bytes live in an avatars folder inside ART_STORAGE_DIR; the users row records the
source and content type. Adds metrics, AVATAR_UPLOAD_MAX_BYTES and the regenerated
OpenAPI document.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-13 11:39:43 +01:00

50 lines
2.0 KiB
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
# Logging: level (DEBUG, INFO, WARNING, ERROR) and format ("text", or "json" for log aggregators).
LOG_LEVEL=INFO
LOG_FORMAT=text
# 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=
# Album art (MusicBrainz + Cover Art Archive, both free and keyless — no setup required).
# MusicBrainz asks for a contact URL/email in requests; falls back to UI_BASE_URL if unset.
MUSICBRAINZ_CONTACT=
# Where downloaded art is stored. docker compose points this at a shared volume; the
# default below is for running the api/worker directly (not in Docker).
ART_STORAGE_DIR=var/album-art
# Largest image a user may upload as their own album art (bytes). Uploaded art is
# stored in ART_STORAGE_DIR too, so back that directory up.
ART_UPLOAD_MAX_BYTES=5242880
# Largest profile image a user may upload (bytes). Stored in an "avatars" folder inside
# ART_STORAGE_DIR, so the same backups cover it.
AVATAR_UPLOAD_MAX_BYTES=2097152
# 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.
# Use the web UI's host and origin: handles become @user@<FEDERATION_DOMAIN>.
FEDERATION_ENABLED=0
FEDERATION_DOMAIN=
FEDERATION_BASE_URL=
# 32+ characters; encrypts actors' private keys. Keep it safe and never change it.
FEDERATION_KEY_SECRET=