https://github.com/mgoltzsche/mopidy-container
An opinionated mopidy container, integrated with Snapcast
https://github.com/mgoltzsche/mopidy-container
Last synced: 11 months ago
JSON representation
An opinionated mopidy container, integrated with Snapcast
- Host: GitHub
- URL: https://github.com/mgoltzsche/mopidy-container
- Owner: mgoltzsche
- Created: 2021-10-03T22:46:45.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2025-09-14T17:23:00.000Z (11 months ago)
- Last Synced: 2025-09-22T17:03:25.306Z (11 months ago)
- Language: Shell
- Homepage:
- Size: 202 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mopidy container
An opinionated [Mopidy](https://github.com/mopidy/mopidy) container built for amd64 or arm64 (e.g. Raspberry Pi) linux machines designed to stream audio to [Snapcast](https://github.com/badaix/snapcast).
It can be deployed using one of the following ways:
* as a [Docker Compose project](./docker-compose.yaml) that also includes a [Snapcast container](https://github.com/mgoltzsche/snapcast-container).
* as a [Kubernetes app](./deploy) (without Snapcast, assuming it was installed separately).
* via the [Kubemate](https://github.com/mgoltzsche/kubemate) web GUI.
## Development
To list the supported targets, run `make help`.
### Prerequisites
* git
* make
* [docker 20+](https://docs.docker.com/engine/install/)
* [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl)
### Build the application
To build the application container image using [skaffold](https://skaffold.dev), run:
```sh
make image
```
### Test the mopidy container using docker
To test container changes, you can run mopidy simply using docker with the pulseaudio unix socket and cookie mounted:
```sh
make run-mopidy
```
Once mopidy started, you can browse it at [`http://localhost:6680`](http://localhost:6680).
To run the compose project:
```sh
make run-snapcast-compose
```
### Troubleshooting
When the log doesn't give you sufficient information to find the cause of a problem, you can enable debug logs as follows:
* To enable Mopidy debug logs, set the env var `MOPIDY_OPTS=-v`.
* To enable GStreamer debug logs, set the env var `GST_DEBUG=3`.
### Deploy the application
To deploy the application using [skaffold](https://skaffold.dev), run:
```sh
make deploy
```
To deploy the application in debug mode (debug ports forwarded), stream its logs and redeploy on source code changes automatically, run:
```sh
make debug
```
To undeploy the application, run:
```sh
make undeploy
```
### Apply blueprint updates
To apply blueprint updates to the application codebase, update the [kpt](https://kpt.dev/) package:
1. Before updating the package, make sure you don't have uncommitted changes in order to be able to distinguish package update changes from others.
2. Call `make blueprint-update` or rather [`kpt pkg update`](https://kpt.dev/reference/cli/pkg/update/) and [`kpt fn render`](https://kpt.dev/reference/cli/fn/render/) (applies the configuration within [`setters.yaml`](./setters.yaml) to the manifests and `skaffold.yaml`).
3. Before committing the changes, review them carefully and make manual changes if necessary.
TL;DR: [Variant Constructor Pattern](https://kpt.dev/guides/variant-constructor-pattern)
## Release
The release process is driven by [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0-beta.4/), letting the CI pipeline generate a version and publish a release depending on the [commit messages](https://semantic-release.gitbook.io/semantic-release/#commit-message-format) on the `main` branch.