docker-bookstack
docker-bookstack copied to clipboard
Bookstack app should able to test connection to MySQL non default port 3306
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
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.
....
Submitted PR
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.
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.
The PR now support DB_PORT
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:
- Default port will be
3306, and can be specified if different with3306, either onDB_HOSTorDB_PORT, but not in both at the same time DB_HOSTcan be host only or host:port- Adding new
DB_PORT - Improve
sedandgrepsearching at beginning of the line, instead of any position on the line - Can uncomment and active the ENV DB info, like
#DB_PORT=anyservernameoriptoDB_PORT=newservernameorip - Can reupdate the ENV DB info again from docker environment variable
- Refactoring file
50-config
