Database connection failed
paolosantarsiero opened this issue · 9 comments
paolosantarsiero commented
I tried but when i'm in database install step there is a error on db connection:
An error occurred while trying to update settings: DATABASE_CONNECTION
gamelaster commented
What is the configuration? I tested latest image and it works OK for me.
paolosantarsiero commented
The same written in readme! I only changed db user password and switch webserver port to 8080.
gamelaster commented
Can you please how me your docker-compose.yml + screenshot of database setup page?
paolosantarsiero commented
version: '2'
services:
mariadb:
image: mariadb
environment:
- MYSQL_USER=opensupports
- MYSQL_PASSWORD=pwdtest
- MYSQL_DATABASE=opensupports
- MYSQL_RANDOM_ROOT_PASSWORD=true
volumes:
- ./database:/var/lib/mysql
website:
image: 'gamelaster/opensupports:latest'
restart: always
ports:
- "8080:80"
volumes:
- ./config:/config
depends_on:
- mariadb
gamelaster commented
Can you please also put docker-compose logs
here? This is really weird, I tested the latest image just week ago and everything worked just fine 😟
paolosantarsiero commented
There aren't any errors on logs:
mariadb_1 | 2023-02-13 16:18:35 0 [Note] Server socket created on IP: '0.0.0.0'.
mariadb_1 | 2023-02-13 16:18:35 0 [Note] Server socket created on IP: '::'.
mariadb_1 | 2023-02-13 16:18:35 0 [Note] mariadbd: ready for connections.
mariadb_1 | Version: '10.10.3-MariaDB-1:10.10.3+maria~ubu2204' socket: '/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution
website_1 | 172.24.0.1 - - [13/Feb/2023:16:18:46 +0000] "POST /api/system/init-database HTTP/1.1" 200 306 "http://localhost:8080/install/step-3" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36"
gamelaster commented
Can you please try this?:
version: '2'
services:
mariadb:
image: mariadb
expose:
- 3306
environment:
- MYSQL_USER=opensupports
- MYSQL_PASSWORD=pwdtest
- MYSQL_DATABASE=opensupports
- MYSQL_RANDOM_ROOT_PASSWORD=true
volumes:
- ./database:/var/lib/mysql
website:
image: 'gamelaster/opensupports:latest'
restart: always
ports:
- "8080:80"
volumes:
- ./config:/config
depends_on:
- mariadb
paolosantarsiero commented
Nothing. Same error
gamelaster commented
@paolosantarsiero please, try to delete database and config folder and try again.