more options
This commit is contained in:
parent
55113f9f52
commit
bafef96e80
@ -11,7 +11,7 @@ RUN cargo build --release --features alsa_backend
|
|||||||
FROM debian:bullseye-slim
|
FROM debian:bullseye-slim
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -yqq --no-install-recommends libasound2 && \
|
apt-get install -yqq --no-install-recommends libasound2 alsa-utils && \
|
||||||
rm -rf /var/lib/apt/lists/* && \
|
rm -rf /var/lib/apt/lists/* && \
|
||||||
groupadd -r spotify && \
|
groupadd -r spotify && \
|
||||||
useradd --no-log-init -r -g spotify -G audio spotify
|
useradd --no-log-init -r -g spotify -G audio spotify
|
||||||
|
25
README.md
25
README.md
@ -1,20 +1,35 @@
|
|||||||
# Spotifyd docker
|
# Spotifyd docker
|
||||||
|
|
||||||
|
[Repo](https://git.kapelle.org/niklas/spotifyd-docker)
|
||||||
|
|
||||||
|
[Docker Hub](https://hub.docker.com/r/djeeberjr/spotifyd)
|
||||||
|
|
||||||
Run [spotifyd](https://github.com/Spotifyd/spotifyd) inside docker. Inspired by [GnaphronG/docker-spotifyd](https://github.com/GnaphronG/docker-spotifyd).
|
Run [spotifyd](https://github.com/Spotifyd/spotifyd) inside docker. Inspired by [GnaphronG/docker-spotifyd](https://github.com/GnaphronG/docker-spotifyd).
|
||||||
|
|
||||||
# Setup
|
# Setup
|
||||||
|
|
||||||
You need to add the `/dev/snd` to the container. Because the container uses Alsa you can have only one application use the device. If you have a something else runnig on your system that uses Alsa, you will get an error.
|
You need to add the `/dev/snd` to the container.
|
||||||
|
|
||||||
|
If the container starts successfully and you still hear no audio then the audio output may be disabled in alsa. In that case you can open bash inside your container and run `alsamixer`. There you can unmute the master. When it comes to alsa i recommend reading the [ArchWiki](https://wiki.archlinux.org/title/Advanced_Linux_Sound_Architecture) on this topic.
|
||||||
|
|
||||||
Check out the `docker-compose.yml` for an example.
|
Check out the `docker-compose.yml` for an example.
|
||||||
|
|
||||||
# Configuration
|
# Configuration
|
||||||
|
|
||||||
Following variables are available.
|
Following variables are available. See the [spotifyd doc](https://spotifyd.github.io/spotifyd/config/File.html) for more information.
|
||||||
|
|
||||||
`SPOTIFYD_USERNAME` Required. Spotify username.
|
`USERNAME` Required. Spotify username.
|
||||||
|
|
||||||
`SPOTIFYD_PASSWORD` Required. Spotify password.
|
`PASSWORD` Required. Spotify password.
|
||||||
|
|
||||||
`SPOTIFYD_DEVICE` Name of the device.
|
`DEVICE` Name of the device. Default: "Spotifyd"
|
||||||
|
|
||||||
|
`VOLUME_NORMALISATION` If set to true, enables volume normalisation between songs.
|
||||||
|
|
||||||
|
`NORMALISATION_PREGAIN` The normalisation pregain that is applied for each song.
|
||||||
|
|
||||||
|
`BITRATE` The audio bitrate. 96, 160 or 320 kbit/s.
|
||||||
|
|
||||||
|
`DEVICE_TYPE`# The displayed device type in Spotify clients. Can be `computer`, `tablet`, `smartphone`, `speaker`, `tv`, `avr`, `stb`, `audiodongle`.
|
||||||
|
|
||||||
|
`INITIAL_VOLUME` Volume on startup between 0 and 100.
|
@ -8,6 +8,6 @@ services:
|
|||||||
devices:
|
devices:
|
||||||
- "/dev/snd:/dev/snd"
|
- "/dev/snd:/dev/snd"
|
||||||
environment:
|
environment:
|
||||||
- SPOTIFYD_USERNAME=myUsername
|
- USERNAME=myUsername
|
||||||
- SPOTIFYD_PASSWORD=myPassword
|
- PASSWORD=myPassword
|
||||||
- SPOTIFYD_DEVICE=Spotifyd
|
- DEVICE=Spotifyd
|
23
start.sh
23
start.sh
@ -1,4 +1,25 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
./spotifyd --no-daemon --username "$SPOTIFYD_USERNAME" --password "$SPOTIFYD_PASSWORD" --device-name "$SPOTIFYD_DEVICE"
|
ARGS=""
|
||||||
|
|
||||||
|
if [ -n "$VOLUME_NORMALISATION" ]; then
|
||||||
|
ARGS="${ARGS} --volume-normalisation"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$NORMALISATION_PREGAIN" ]; then
|
||||||
|
ARGS="${ARGS} --normalisation-pregain ${NORMALISATION_PREGAIN}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$BITRATE" ]; then
|
||||||
|
ARGS="${ARGS} --bitrate ${BITRATE}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$DEVICE_TYPE" ]; then
|
||||||
|
ARGS="${ARGS} --device-type ${DEVICE_TYPE}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$INITIAL_VOLUME" ]; then
|
||||||
|
ARGS="${ARGS} --initial-volume ${INITIAL_VOLUME}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
./spotifyd --no-daemon --username "$USERNAME" --password "$PASSWORD" --device-name "${DEVICE:=Spotifyd}" $ARGS
|
||||||
|
Loading…
Reference in New Issue
Block a user