Docker procedure (WIP)

Prepare server

On a local (raspberry 3-4) or remote (ubuntu LTS) server perform the following installation steps

sudo apt-get update

# Python
sudo apt-get install python3 python3-pip git
sudo python3 -m pip install --upgrade pip

Clone o2m master repository from its source and go in it

git clone [[email protected]](<mailto:[email protected]>):object2music/o2m
cd o2m

To be noted that several ports/access will have to be opened on the server :

Finaly to run correctly spotify playback and mopidy-spotify extension you’ll have to compile gst-plugins as explained here : https://github.com/mopidy/mopidy-spotify

  1. Install Rust:

    curl --proto '=https' --tlsv1.2 -sSf <https://sh.rustup.rs> | sh
    
  2. Install the GStreamer Rust bindings dependencies:

    sudo apt install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gcc pkg-config git
    
  3. Download, build and install gst-plugins-spotify from source:

    git clone --depth 1 <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs>
    cd gst-plugins-rs
    cargo build --package gst-plugin-spotify --release
    sudo install -m 644 target/release/libgstspotify.so $(pkg-config --variable=pluginsdir gstreamer-1.0)/
    
  4. Verify the spotify plugin is available:

    gst-inspect-1.0 spotify
    

Install Mopidy + extensions

# Mopidy
wget -q -O - <https://apt.mopidy.com/mopidy.gpg> | sudo apt-key add -
sudo wget -q -O /etc/apt/sources.list.d/mopidy.list <https://apt.mopidy.com/buster.list>
sudo apt update
sudo apt-get install mopidy python-spotify libspotify-dev 

sudo python3 -m pip install -r requirements.txt

#Mopidy spotify extension
sudo python3 -m pip install <https://github.com/mopidy/mopidy-spotify/archive/master.zip>

# Mopidy running as a service
sudo systemctl enable mopidy
sudo adduser mopidy video
echo "mopidy ALL=NOPASSWD: /usr/local/lib/python3.9/dist-packages/mopidy_iris/system.sh" | sudo tee -a /etc/sudoers

# Finalise modpidy configuration
sudo cp samples/mopidy.conf /etc/mopidy/mopidy.conf
sudo chmod 777 /etc/mopidy/mopidy.conf
sudo vi /etc/mopidy/mopidy.conf #and configure as needed
sudo mopidyctl local scan #if needed

If concerns or evolution with standards mopidy installation just follow the updated installation process from official website https://docs.mopidy.com/en/latest/installation/index.html