The first visit to the UI creates the account from a username and password; after that every API route needs a session cookie from logging in. Accounts are stored in app_user (Argon2id password hashes) and sessions in user_session (SHA-256 token hashes, 30 days). The account page lets the user save a Listenbrainz token, checked with Listenbrainz first. It takes priority over listenbrainz.token from the config for LB Radio suggestions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
48 lines
1.6 KiB
YAML
48 lines
1.6 KiB
YAML
# playlistd and its database. Copy .env.example to .env, fill it in, then run:
|
|
# docker compose up -d --build
|
|
name: playlistd
|
|
|
|
services:
|
|
playlistd:
|
|
build:
|
|
context: .
|
|
# podman would otherwise pick Containerfile, which builds the .deb
|
|
dockerfile: Dockerfile
|
|
image: playlistd
|
|
restart: unless-stopped
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
ports:
|
|
# the first visit creates the login, so by default it's only reachable from this machine
|
|
- "${PLAYLISTD_BIND:-127.0.0.1}:${PLAYLISTD_PORT:-8000}:8000"
|
|
environment:
|
|
DATABASE_URL: postgres://playlistd:${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD in .env}@db/playlistd
|
|
SUBSONIC_BASE: ${SUBSONIC_BASE:?Set SUBSONIC_BASE in .env}
|
|
SUBSONIC_USERNAME: ${SUBSONIC_USERNAME:?Set SUBSONIC_USERNAME in .env}
|
|
SUBSONIC_PASSWORD: ${SUBSONIC_PASSWORD:?Set SUBSONIC_PASSWORD in .env}
|
|
LISTENBRAINZ_TOKEN: ${LISTENBRAINZ_TOKEN:-}
|
|
DAEMON_INTERVAL: ${DAEMON_INTERVAL:-240}
|
|
LOG_LEVEL: ${LOG_LEVEL:-info}
|
|
# lets SUBSONIC_BASE point at a server on the Docker host: http://host.docker.internal:4533/rest
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
|
|
db:
|
|
image: postgres:16-alpine
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: playlistd
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD in .env}
|
|
POSTGRES_DB: playlistd
|
|
volumes:
|
|
- db:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD", "pg_isready", "-U", "playlistd", "-d", "playlistd"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 20
|
|
|
|
volumes:
|
|
db:
|