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
https://balena.io/blog/turn-your-old-speakers-or-hi-fi-into-bluetooth-receivers-using-only-a-raspberry-pi/
MIT License
2.39k stars 427 forks source link

Environmental variables #601

Open bszafarz opened 1 year ago

bszafarz commented 1 year ago

Based on the list of Issues labels, IMO the most suitable is label:discussion

During build of my own balena-sound-pihole blend based on

I'd like to perform some customization but most problematic (and still unresolved) is the custom sound-supervisor port.

When I change port using docker-compose environment variable, it partially works as container use defined port. That also works when I've placed the environmental variable in Dockerfile. Nevertheless both of the approaches works only partially. The supervisor module starts and listen on custom port but the music does not play despite successful connection and streaming song according to spotify-connect logs.

According to my checks the SOUND_SUPPERVISOR_PORT is used only by the sound-supervisor module (that why I've used docker/docker-compose env variables with respect to sound-supervisor service) hence I don't understand why sound is not working.

Project works if I set the same variable with the same value as a balena-environmental-variable with --device scope on all services.

Is there any documentation related to the scope of variables and difference between them (different than that)? The approach of balena-env-vars is not convenient as during change of the project and/or moving device result in vars removal hence I wanted to place them within the project config to be able to deploy it with single command.

I appreciate yours feedback.