MusicBot-Docker
is a fully stateless and immutable Docker implementation of MusicBot
. Compared to other docker projects, the configuration is done via environment variables and does not require any configuration injection or external files. The Ansible Playbook will configure the application followed by an s6-overlay to control the application processes. The application is built inside a Python3 virtual environment (venv), to ensure all python dependencies are within one directory. This is important as the application is first built in one container, and then copied into another container, to make the smalletst Docker image possible.
- Docker
- Discord server
- Discord Token at discordapp.com/developers (ENV_MUSICBOT_TOKEN)
By providing only the token, the bot will join the same channel as the owner.
docker run --rm --name "my-musicbot" --detach -e "ENV_MUSICBOT_TOKEN=NDI4Njg0MzEyODg4NDc1Njc4.DZ2yfQ.vF1MIFcb4CndTZlH3u7ExBhtjbo" glego/musicbot:latest
Raspberry Pi 2/3
docker run --rm --name "my-musicbot" --detach -e "ENV_MUSICBOT_TOKEN=NDI4Njg0MzEyODg4NDc1Njc4.DZ2yfQ.vF1MIFcb4CndTZlH3u7ExBhtjbo" -e "ENV_MUSICBOT_USEEXPERIMENTALEQUALIZATION=no" glego/musicbot:arm32v6-latest
Run on a Raspberry Pi 2/3 cluster
docker service create --name "my-musicbot" -e "ENV_MUSICBOT_TOKEN=NDI4Njg0MzEyODg4NDc1Njc4.DZ2yfQ.vF1MIFcb4CndTZlH3u7ExBhtjbo" -e "ENV_MUSICBOT_USEEXPERIMENTALEQUALIZATION=no" glego/musicbot:arm32v6-latest
As the
--rm
flag was provided during the docker run command, the container will be destroyed after it's stopped
For the Raspberry Pi the Equalizer has been disabled because of the playtime delay (will be fixed in future release)
docker logs my-musicbot
4. Authorize the app with the url
docker restart my-musicbot
Restart is required, because the bot doesn't re-join the channel automatically after authorization
musicbot-servers
is the file with all supported variables.example_options.ini.j2
is the options.ini template.
- Docs
- Configuration Permissions
- Run user as non root