Closed talesam closed 2 years ago
Hello @talesam The first line is quite relevant :
PHP Fatal error: Uncaught PDOException: PDO::__construct(): php_network_getaddresses: getaddrinfo failed: Name does not resolve in /flarum/app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:40
The container can't resolve the host you set for the DB.
Hello @talesam The first line is quite relevant :
PHP Fatal error: Uncaught PDOException: PDO::__construct(): php_network_getaddresses: getaddrinfo failed: Name does not resolve in /flarum/app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:40
The container can't resolve the host you set for the DB.
I didn't understand why, I didn't arrive and change anything after I climbed the container.
version: "3.9"
services:
forumbig_db:
image: mariadb:10.5
container_name: forumbig_db
environment:
- MYSQL_ROOT_PASSWORD=xxxxxxxxxxxxxxxxx
- MYSQL_DATABASE=flarum
- MYSQL_USER=flarum
- MYSQL_PASSWORD=yyyyyyyyyyyyyyyyyy
volumes:
- /home/tales/Docker/Bigforum/mysql/db:/var/lib/mysql
networks:
t4l35-net:
flarum_big:
image: mondedie/flarum:stable
container_name: flarum_big
env_file:
- .env
volumes:
- /home/tales/Docker/Bigforum/assets:/flarum/app/public/assets
- /home/tales/Docker/Bigforum/extensions:/flarum/app/extensions
- /home/tales/Docker/Bigforum/storage/logs:/flarum/app/storage/logs
- /home/tales/Docker/Bigforum/nginx:/etc/nginx/flarum
expose:
- "8888"
depends_on:
- forumbig_db
networks:
t4l35-net:
networks:
t4l35-net:
name: t4l35-net
Ah it's after climbed the container ? Are you sure the two container are well in the same network ?
Also check the DB name you use is flarumbig_db
I recreated the container and gave the same error.
DEBUG=false
FORUM_URL=https://forumdev.biglinux.com.br
# Database configuration
DB_HOST=mariadb
DB_NAME=flarum
DB_USER=flarum
DB_PASS=xxxxxxxxxxxxxxxxxxxxxxx
DB_PREF=flarum_
DB_PORT=3306
# User admin flarum (environment variable for first installation)
# /!\ admin password must contain at least 8 characters /!\
FLARUM_ADMIN_USER=admin
FLARUM_ADMIN_PASS=xxxxxxxxxxxxxxxxxxx
FLARUM_ADMIN_MAIL=my@mail.com
FLARUM_TITLE=Forum Biglinux
I had the forum up before and it was working, now it's not.
Ok you have mariadb has host it should be the same than the service in you compose file on the example should be forumbig_db
Wow, I didn't even see it, I must have changed it later, thanks!
No need to rename the issue I will just close it :)
I already checked the log and there is nothing relevant and that. I saw a topic saying to restart the bank, but it's docker, I gave stop and start and nothing changed.
https://discuss.flarum.org/d/7585-free-flarum-hosting-on-an-expert-platform-by-freeflarum-com/2848