Sign inSign up

kschnieders/spotify-redirect

By kschnieders

•Updated 7 months ago

Redirects to the latest Spotify track of an artist. Easy setup with Docker Compose.

Image
Integration & delivery
Web servers
1

1.3K

kschnieders/spotify-redirect repository overview

⁠Docker Compose Setup for Spotify Latest Track Redirect

With this Docker Compose configuration, you can start a small web service that automatically redirects users to the latest track by a specific Spotify artist.

⁠How it works

The service retrieves your artist's latest release from Spotify and forwards all requests to the track's URL. This makes it easy for you to always link to your latest song without having to worry about constantly updating the link on other services.

⁠Customizable Filters

You have full control over what counts as your "latest" release. If you prefer, you can specifically choose which types of content to search for. For example:

  • single : Forward users only to your latest Single
  • album : Redirect exclusively to your latest EPs and albums
  • album,single : Redirect exclusively to your latest EPs, albums, and singles

This can be passed on as an environment variable. Please refer to the example below from docker-compose. Note: In the Spotify API, EPs are technically categorized as "albums". Selecting "album" will include both full albums and EPs.

⁠Prerequisites

You will need to obtain a client ID and client secret from the Spotify Developer Portal. You can sign up and find this information here:
Spotify Developer Portal⁠

Additionally, you will need your artist ID from Spotify. To find your artist ID, follow these steps:

  1. Go to your Spotify profile.
  2. Open the menu and select Share Profile.
  3. The URL will look something like this:
    open.spotify.com/artist/ARTIST_ID_HERE?si=xxxxx

⁠Example Compose File

Here's an example of the docker-compose.yml file you can use to get started:

services:
  php-apache:
    image: kschnieders/spotify-redirect:latest
    container_name: spotify-redirect
    environment:
      - SPOTIFY_CLIENT_ID=your-client-id
      - SPOTIFY_CLIENT_SECRET=your-client-secret
      - SPOTIFY_ARTIST_ID=your-artist-id
      - SPOTIFY_RELEASE_TYPE=album,single
    ports:
      - "80:80"
    restart: always

Tag summary

Content type

Image

Digest

sha256:0fc851f4e…

Size

167 MB

Last updated

7 months ago

docker pull kschnieders/spotify-redirect