linuxserver / docker-bookstack

A Docker container for the BookStack documentation wiki
GNU General Public License v3.0
747 stars 108 forks source link

Bookstack app should able to test connection to MySQL non default port 3306 #135

Closed thohng closed 1 year ago

thohng commented 1 year ago

linuxserver.io


Our Bookstack hosting using Digital Ocean MySQL cluster which not use the default port 3306.

Expected Behavior

Bookstack app should able to test connection to MySQL which not use default port, e.g. DB_HOST=10.109.0.2:25060.

Current Behavior

The startup process will try to test connection to MySQL in 30 seconds before can proceed the next steps.

Steps to Reproduce

Provide configuration environment on docker-compose.yml

environment:
  - APP_URL=https://domain
  - DB_HOST=10.109.0.2:25060
  - DB_USER=user
  - DB_PASS=password
  - DB_DATABASE=database_name
  1. DB_HOST=10.109.0.2:25060

Environment

OS: Ubuntu 20.04 TLS CPU architecture: x86_64 How docker service was installed: From the official https://docs.docker.com/engine/install/ubuntu/

Command used to create docker container (run/create/compose/screenshot)

docker-compose up -d
docker-compose logs -f

Docker logs

...
Running config - db_user set
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
nc: getaddrinfo: Name does not resolve
Nothing to migrate.
....
github-actions[bot] commented 1 year ago

Thanks for opening your first issue here! Be sure to follow the bug or feature issue templates!

thohng commented 1 year ago

Submitted PR

drizuid commented 1 year ago

Will the change in PR we've discussed still resolve the issue you're reporting here? Majority of the team doesn't change the db port so it's not something we had encountered before and like you, we would like to see it resolved.

thohng commented 1 year ago

Yub, I've tested the PR fixes this issue. And I think Im going to extent the PR a bit to have it support DB_PORT also.

thohng commented 1 year ago

The PR now support DB_PORT

thohng commented 1 year ago

The issue is fixed from version v22.11.1 from build 23/Dec/2022: https://hub.docker.com/layers/linuxserver/bookstack/22.11.1/images/sha256-356ae10976e45c62c57fb15e1ad257b002c3cd133f8e34fb3703ee3484530e01?context=explore

Fix and improvements in the PR 136: