sweisgerber / docker-snapcast

Snapcast Multiroom audio docker image
7 stars 5 forks source link

Snapweb not starting with lastest docker image #10

Open COMPsmith opened 2 months ago

COMPsmith commented 2 months ago

The snapweb interface is showing it is not installed with the latest image on dockerhub https://hub.docker.com/r/sweisgerber/snapcast/tags

Snapweb Placeholder
This is a placeholder for [Snapweb](https://github.com/badaix/snapweb/releases), a web based control client and player for Snapcast.
To install Snapweb, please follow these steps:

Download Snapweb on the [Snapweb release page](https://github.com/badaix/snapweb/releases). You can either download
snapweb.zip and extract it on your Snapcast server machine, e.g. into /usr/share/snapserver/snapweb or
snapweb_x.y.z-1_all.deb and install it with sudo apt install ./snapweb_x.y.z-1_all.deb to /usr/share/snapweb
Configure the document root (doc_root, see below) in the snapserver configuration file snapserver.conf — usually located in /etc/snapserver.conf — to the location where snapweb is extracted or installed.
Restart Snapserver to activate the changes: sudo service snapserver restart
# HTTP RPC #####################################
#
[http]

...

# serve a website from the doc_root location
doc_root = /usr/share/snapserver/snapweb/

#
################################################
semibreve42 commented 1 month ago

I ended up creating a directory in my /data folder for snapweb, grabbing the .zip for snapweb (https://github.com/badaix/snapweb/releases/tag/v0.7.0), unzipping it in the directory I made, then modifying the snapserver.conf to point at that directory, like the error message suggests.

That fixed the issue for me.

ethanllewis commented 1 month ago

How do you determine the directory location for the .conf file? I've tried using the mapped location for /data but it doesn't seem to recognize it in the .conf file.

semibreve42 commented 1 month ago

@ethanllewis should be in the docker at /etc/snapserver.conf

MichaelUray commented 4 weeks ago

I did run into the same problem and I created a dedicated volume (snapserver:/usr/share/snapserver/) for snapserver to solve it.

version: "3"
services:
  snapcast:
    container_name: sc1
    image: docker.io/sweisgerber/snapcast:latest
    environment:
      - PUID=1000
      - PGID=1000 # set to audio group ID
      - TZ=Europe/Vienna
      - START_SNAPCLIENT=false # set to `true` for snapclient to start
      # --host: name or ip of compose service or dockerhost
      # --soundcard: <ID> from `snapclient -l` from inside the container
      # - SNAPCLIENT_OPTS=--host snapcast --soundcard <ID>
      #   => Don't use quotes for SNAPCLIENT_OPTS="" !
      # - HOST_AUDIO_GROUP=<AUDIO-GID> # set to GID of host audio group
    restart: "unless-stopped"
#    ports:
#      - 1704:1704 # port for the actual audio streaming
#      - 1705:1705 # port for TCP Json RPC
#      - 1780:1780 # port for the SnapWeb Webinterface
    # devices:
      # - /dev/snd:/dev/snd # optional, only if you want to use snapclient
    volumes:
      - config:/config/
      - data:/data/
      # /audio should get used to place FIFOs for audio playback from mpd/mopidy/host/etc
      - audio-fifos:/audio/
      - snapserver:/usr/share/snapserver/
    networks:
      eth0MACVLAN:
        ipv4_address: 192.168.91.41
volumes:
  config:
  data:
  audio-fifos:
  snapserver:

networks:
  eth0MACVLAN:
    name: eth0MACVLAN
    external: true

After that I went into the container to download and extract the snapserver:

docker exec -it sc1 /bin/bash
cd /usr/share/snapserver/snapweb
rm index.html
wget https://github.com/badaix/snapweb/releases/latest/download/snapweb.zip
unzip snapweb.zip
MichaelUray commented 4 weeks ago

@ethanllewis should be in the docker at /etc/snapserver.conf

The process in the container runs with /usr/bin/snapserver --config /config/snapserver.conf

I think the config file which gets used is located in /config/snapserver.conf