Skip to content

Conversation

@FlorentLM
Copy link

@FlorentLM FlorentLM commented Mar 18, 2025

I'm using https://github.com/BinaryBrain/Beetstream to serve my beets database to Subsonic clients and wanted to have a clean way to install it.

So here are two new environment variables:

PIP_EXTRA_PACKAGES : comma separated list of beets plugins to install via pip
EXTRA_COMMANDS : comma separated list of extra commands to run at the start

Example given in the README:

(...)
environment:
    - UID=1000 # (optionally) set user id
    - GID=1000 # (optionally) set group id
    - PIP_EXTRA_PACKAGES=beetstream
    - EXTRA_COMMANDS="beet beetstream &"
( ...)

The pip install runs via root (because the plugins need to be installed in /usr/lib/python3.11/site-packages otherwise beets won't see them, but the root account is immediately dropped after that and then the extra commands and the main betanin command are ran under the unproviledged user.

Edit: Oh, and I removed the dependency to sudo because it's all running as the betanin user

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant