Admidio / admidio

Admidio is a free open source user management system for websites of organizations and groups. The system has a flexible role model so that it’s possible to reflect the structure and permissions of your organization.
https://www.admidio.org
GNU General Public License v2.0
332 stars 131 forks source link

SQL Error on Docker #1671

Open Niemand112233 opened 4 months ago

Niemand112233 commented 4 months ago

Hi,

when using the docker image I get this error on the webpage:

SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for admidio-mariadb failed: Name or service not known

schast commented 4 months ago

The hostname of Mariadb Container must equal to the hostname of ADMIDIO_DB_HOST like described in the README-Docker.md. And both Container must in the same Docker Network.

docker run --detach -it --name "Admidio-MariaDB" \
  --hostname "admidio-mariadb" \
  -p 3306:3306 \
  --restart="unless-stopped" \
  -v "Admidio-MariaDB-confd:/etc/mysql/conf.d" \
  -v "Admidio-MariaDB-data:/var/lib/mysql" \
  -e MYSQL_DATABASE="admidio" \
  -e MYSQL_ROOT_PASSWORD="my_VerySecureRootPassword.01" \
  -e MYSQL_USER="admidio" \
  -e MYSQL_PASSWORD="my_VerySecureAdmidioUserPassword.01" \
  mariadb:latest
docker run --detach -it --name "Admidio" \
  -p 8080:8080 \
  --restart="unless-stopped" \
  -v "Admidio-files:/opt/app-root/src/adm_my_files" \
  -v "Admidio-themes:/opt/app-root/src/adm_themes" \
  -v "Admidio-plugins:/opt/app-root/src/adm_plugins" \
  -e ADMIDIO_DB_HOST="admidio-mariadb:3306" \
  -e ADMIDIO_DB_NAME="admidio" \
  -e ADMIDIO_DB_USER="admidio" \
  -e ADMIDIO_DB_PASSWORD="my_VerySecureAdmidioUserPassword.01" \
  -e ADMIDIO_ROOT_PATH="https://www.mydomain.at/admidio" \
  admidio/admidio:latest

Can you post your Admidio Docker Config?

Fasse commented 1 month ago

@Niemand112233 Is this issue still open?

IKyriazis commented 1 week ago

i had this same problem, I didn't realize I had to add both docker containers to the same network. I executed the following command to create the network: docker network create admidio-network

and I added the following flag to both of the container execution commands: --network admidio-network

Fasse commented 1 week ago

@schast Maybe that should be described more prominent in the docker md.