evilru / quake3-vsp-stats

VSP Stats Game Log Processor - updated and working version of vsp-0.45-xp-1.2-full.zip from https://vsp.goquake.com/ as docker image: https://hub.docker.com/r/evilru/quake3-vsp-stats.
MIT License
11 stars 10 forks source link

error: cannot establish database connection or database vsp does not exist #16

Open carlomigueldy opened 11 months ago

carlomigueldy commented 11 months ago

Pulled the repo into local machine and directly went with docker-compose up -d and completed the installation. When opening localhost in my browser it says error: cannot establish database connection or database vsp does not exist, is there anything I miss?

Screenshot 2023-10-25 at 4 24 54 PM

Appelpitje commented 10 months ago

Had the same issue, you can solve this by setting DB_HOSTNAME in the docker-compose.yml file like follows:

      TZ: Europe/Berlin
      # needs to be at least 6 characters long
      LOGTYPE: xxx
      # VSP_WEB_PASSWORD:
      DB_HOSTNAME: db
      DB_NAME: vsp
      # use the same value as for MYSQL_USER
      DB_USERNAME: xxx
      # use the same value as for MYSQL_PASSWORD
      DB_PASSWORD: xxx
evilru commented 10 months ago

@carlomigueldy, thank you for reporting this! What os is your docker host running on? Did you add a db hostname as described in the readme https://github.com/evilru/quake3-vsp-stats/blob/master/Docker.md#db_hostname ?

I am asking as the default hostname stated in the readme is wrong. The default, which is already set in the Dockerfile is db. https://github.com/evilru/quake3-vsp-stats/blob/dfa92af45fa90ae0d4eb7ddd132e27d107545148/Dockerfile#L19 There shouldn't be the need for setting it at all.

@Appelpitje, may I ask you to check if it works without setting a hostname in the docker-compose.yml?

Cheers

Appelpitje commented 10 months ago

@evilru i tried it on an orangepi with Orange Pi 1.0.0 Jammy. And on a scaleway cloud server with Ubuntu 22.04.3 LTS. It didnt work without settings the hostname in docker-compose.yml.

evilru commented 10 months ago

@Appelpitje, @carlomigueldy, I just updated the config to use the latest mariadb - this resolves the issue.

there is no need to set the dbhostname

but make sure you set db username and password as described on dockerhub

It would be great if you could verify that this fixes the problem for you too!

Cheers