Can anyone share their bookstack docker-compose app with me?
I am trying to host it and the sample docker-compose file herehttps://github.com/linuxserver/docker-bookstack/pkgs/container/bookstack#usage
does not work for me. Getting error when db migration is applied.
I am testing this on my windows machine locally but intend to host in a linux machine.
docker-compose file. https://pastebin.com/AVLrG4Ea
Might sound silly, but instead of doing
https://localhost:6875
, try127.0.0.1:6875
or you internal network ip (for testing until you get a domain) e.g.192.168.0.1
as might be a name resolving thing.Also have you got TLS/HTTPS setup?
I did try 127.0.0.1 i was able to reach the login page but got some error as well. So i doubt thats the problem. The screenshot i have above shows that there is issue with database migration. I think thats the problem.
Have you tried debugging the issue by running the MySQL container alone (i.e. comment out the “bookstack:” section of the docker-compose file)?
Does the container start and run? Are you able to connect to port 3306 of the container from the host, using whatever userid and password you specified?
I tried this. I was able to connect to the db. I was able to resolve this now after reading comment from u/ssddanbrown.
Fun fact: don’t comment out anything, just find the name of the database service, let’s say it’s db, then run
docker compose up db
to launch it on its own.
Have you tried http instead of https in the compose file?
Yes I tried that. Access to the url was not the issue though.
Anyway thanks for the comment. I was able to resolve the issue with help from u/ssddanbrown
This is common on windows. Something funk goes on at the filesystem level in this configuration which causes issues with migrations. There’s a relevant thread here. Some folks in there have solved it via alternative volume options, or alternative database docker images. Should not be something you experience on Linux though.
Oh my god. I wasted hours for nothing. This was indeed the issue. I ran it docker volume it worked fine in windows. Then tried in Ubuntu server by mapping to host directory and it is running now.
Thank you very much.
Happy to help! Just as an extra warning, don’t auto-upgrade BookStack containers via something like watchtower. Most of the annoying issues I’ve had reported from docker users of BookStack seems to be due to auto-upgrade failing, which can often be hard to track down since errors may not show right away, or the user many not realise an update was attempted.
Thanks will keep that in mind. Also thanks for all your work on this. Really looking forward to use this.
Yeah, looks like your bookstack app is unable to connect to its database container.
Have you tried letting run a bit? Sometimes the bookstack container will try to connect to the DB container before it has had sufficient time to initialize properly… It the config is set up properly, it should eventually connect to it.
Like another user mentioned, sometimes “localhost” definition is missing in Windows, so try using the local loopback IP (127.0.0.1) instead of “localhost”, to take out DNS/Naming issues from the equation. (APP_URL env variable)
Aside from those points I mentionned, my docker-compose matches yours (no APP_KEY though env variable though).
Good luck!
I’m a fan of linuxserver.io images - https://docs.linuxserver.io/images/docker-bookstack