
Description
Expected Behavior
Bookstack app should connect to use mysql running on 10.1.1.50:3315. (ip and port should be considered which is defined in docker-compose.yml file)
Current Behavior
When Providing DB_PORT environment variable in docker-compose.yml file, is ignored by the image and still tries to connect to default mysql port 3306.
Steps to Reproduce
- docker-compose.yml file:
version: "2"
services:
bookstack:
image: ghcr.io/linuxserver/bookstack
container_name: bookstack
environment:
- PUID=1000
- PGID=1000
- APP_URL=localhost
- DB_HOST=10.1.1.50
- DB_PORT=3315
- DB_DATABASE=bookstack
- DB_USER=bookstack
- DB_PASS=bookstack
volumes:
- /path/to/data:/config
ports:
- 80:80
restart: unless-stopped
networks:
bookstack-network:
external:
name: bookstack
Environment
OS: : tried on Linux Debian and also on Linux Ubuntu and also on MacOs same issue on all of this OS
CPU architecture: x86_64
How docker service was installed:
Docker service installed from official instruction here : https://docs.docker.com/get-docker/
Command used to create docker container (run/create/compose/screenshot)
docker-compose up
Docker logs
1 Doctrine\DBAL\Driver\PDOException::("SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client")
After debugging found out that above log generated because of mysql server port is not considered as defined in docker-compose.yml (DB_PORT=3315) but tries to connect to default port of mysql server 3306 which is not port of mysql server in mycase.
Thank you for help. Please write me if you need more information.