Hello,
After using balena sound for 4 month GitHub - balena-io-experimental/balena-sound: Build a single or multi-room streamer for an existing audio device using a Raspberry Pi! Supports Bluetooth, Airplay and Spotify Connect I am force to look for alternative as it does lags & Interrupts randomly.
My device is Raspberry Pi3
Becasue of above I trying to build a Release at balenaCloud with Spotifyd as container/service.
However I do face problems, let start for begining.
This is how my project structure does looks like:
spotify-balena/
├── .gitignore
├── docker-compose.yml
└── spotifyd/
├── Dockerfile.template
└── start.sh
my docker-compose.yml contains:
version: '2.4'
services:
spotifyd:
build: ./spotifyd # Ścieżka do katalogu z Dockerfile
container_name: spotifyd
restart: unless-stopped
network_mode: host
privileged: true
environment:
- SPOTIFY_USERNAME=${SPOTIFY_USERNAME}
- SPOTIFY_PASSWORD=${SPOTIFY_PASSWORD}
- SPOTIFY_DEVICE_NAME=RaspberryPi
- SPOTIFY_BITRATE=160
- SPOTIFY_BACKEND=alsa
- SPOTIFY_DEVICE=hw:0
labels:
io.balena.features.dbus: '1'
my docker-template.file
FROM balenalib/raspberrypi3-debian:latest
# Instalacja zależności
RUN apt-get update && apt-get install -y \
curl \
alsa-utils \
build-essential \
libasound2-dev \
libssl-dev \
pkg-config \
git \ # Dodaj git
&& rm -rf /var/lib/apt/lists/*
# Instalacja Rust i Cargo
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
# Pobierz i zbuduj Spotifyd z repozytorium GitHub
RUN git clone https://github.com/Spotifyd/spotifyd.git /spotifyd
WORKDIR /spotifyd
RUN cargo build --release
# Skopiuj skrypt startowy
COPY start.sh /usr/local/bin/start.sh
RUN chmod +x /usr/local/bin/start.sh
# Ustawienie punktu wejścia
ENTRYPOINT ["/usr/local/bin/start.sh"]
and start.sh
#!/bin/bash
/spotifyd/target/release/spotifyd \
--username "$SPOTIFY_USERNAME" \
--password "$SPOTIFY_PASSWORD" \
--device-name "$SPOTIFY_DEVICE_NAME" \
--bitrate "$SPOTIFY_BITRATE" \
--backend "$SPOTIFY_BACKEND" \
--device "$SPOTIFY_DEVICE"
it does build sucesfully however SpotifyD doesn’t start giving following errors:
spotifyd /usr/bin/spotifyd: line 1: Not: command not found
Service exited 'spotifyd sha256:aa55e81a0c4b412e879493702edffa43a2082eec35298fb5c300a400389b431a'
Restarting service 'spotifyd sha256:aa55e81a0c4b412e879493702edffa43a2082eec35298fb5c300a400389b431a'
anybody can support please?