~rf/SpotifyRandomAlbum

Finally, the missing feature. Random albums from Spotify.

cdb8744 Export metrics server

~rf pushed to ~rf/randomalbum git

2 years ago

ad05052 Export metrics server

~rf pushed to ~rf/randomalbum git

2 years ago

#Randomalbum

Gives you random Spotify albums. That's it. You click a button, Spotify opens with a random album in your library. You click another button, you get 25 random albums from your library.

#Deploy it to your own server

With docker-compose and Caddy for example, having the Spotify API setup to callback to https://{your domain}/callback:

# docker-compose.yaml

services:
    randomalbum:
        image: donotnoot/randomalbum:latest
        container_name: randomalbum
        restart: always
        environment:
            - SPOTIFY_CLIENT_ID={your client ID}
            - SPOTIFY_CLIENT_SECRET={your client secret}
            - DB_FILE=/var/randomalbum/db.sqlite3
            - BASE_URL=https://{your domain}
            - SERVER_ADDRESS=0.0.0.0:8080
        volumes:
            - ./randomalbum-data:/var/randomalbum

    caddy:
        image: caddy:2
        container_name: caddy
        restart: always
        ports:
            - 80:80
            - 443:443
        volumes:
            - ./Caddyfile:/etc/caddy/Caddyfile:ro
            - ./caddy-config:/config
            - ./caddy-data:/data
        environment:
            - RANDOMALBUM_DOMAIN=https://{your domain}
            - RANDOMALBUM_LOG_FILE=/data/randomalbum.log
            - EMAIL={your email for the TLS stuff}
# Caddyfile
{$RANDOMALBUM_DOMAIN}:443 {
	tls {$EMAIL} # Free TLS.
	reverse_proxy randomalbum:8080
}