jgeusebroek / docker-spotweb

A docker image running ubuntu/20.04 Linux and Spotweb
47 stars 27 forks source link

Unable to get this to work with docker-compose on a Synology nas #56

Open moostmartijn opened 1 year ago

moostmartijn commented 1 year ago

My docker-compose file:

  spotweb:
    image: jgeusebroek/spotweb
    container_name: spotweb
    restart: unless-stopped
    environment:
     - PUID=1026
     - GUID=100
     - TZ=Europe/Amsterdam
     - SPOTWEB_DB_TYPE=pdo_mysql
     - SPOTWEB_DB_HOST=spotweb_db
     - SPOTWEB_DB_PORT=3306
     - SPOTWEB_DB_NAME=spotweb
     - SPOTWEB_DB_USER=spotweb
     - SPOTWEB_DB_PASS=spotweb
     - "SPOTWEB_CRON_RETRIEVE=* */2 * * *"
    depends_on:
     - spotweb_db
    ports:
     - 81:80
    volumes:
     - /volume1/apps/spotweb:/config
    network_mode: "service:gluetun"

  spotweb_db:
    image: linuxserver/mariadb
    container_name: spotwebdb
    restart: unless-stopped
    environment:
     - PUID=1026
     - PGID=1000
     - MYSQL_ROOT_PASSWORD=xxxx
     - TZ=Europe/Amsterdam
     - MYSQL_DATABASE=spotweb
     - MYSQL_USER=spotweb
     - MYSQL_PASSWORD=spotweb
    volumes:
     - /volume1/apps/mariadb:/config
    ports:
     - 3306:3306

In the log: rm: cannot remove '/var/www/spotweb/dbsettings.inc.php': No such file or directory

When restarting the container:

Unable to connect to database:
No database settings have been entered, please use the 'install.php' wizard to install and configure Spotweb.
Schermafbeelding 2023-03-18 om 11 00 35

It seems I'm not the only one when I read the issues. Unfortunately I did not find a solution because I don't have the knowledge to fix it myself...

meligo commented 1 year ago

got the same, I can do the install.php, so that does talk to mariadb... but then running the docker image with the settings nothing happens

WeterPeter commented 1 year ago

I run spotweb on my Synology just fine, I use this script :

sudo docker run -d \ --hostname=spotweb \ --name=spotweb \ -p 9096:80 \ -e TZ=Europe/Amsterdam \ -e 'SPOTWEB_DB_TYPE=pdo_mysql' \ -e 'SPOTWEB_DB_HOST=192.168.1.1' \ -e 'SPOTWEB_DB_PORT=3306' \ -e 'SPOTWEB_DB_NAME=dbname' \ -e 'SPOTWEB_DB_USER=username' \ -e 'SPOTWEB_DB_PASS=password' \ -e 'SPOTWEB_CRON_RETRIEVE:/15 ' \ -e 'SPOTWEB_CRON_CACHE_CHECK:10 /1 *' \ -v /volume1/docker/spotweb:/config \ --restart always \ --network=bridge \ jgeusebroek/spotweb

roccolangeweg commented 2 months ago

Currently I'm running into the same issue here, seems it cannot read the database file.