this post was submitted on 20 Oct 2023
1 points (100.0% liked)

Self-Hosted Main

515 readers
1 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

For Example

We welcome posts that include suggestions for good self-hosted alternatives to popular online services, how they are better, or how they give back control of your data. Also include hints and tips for less technical readers.

Useful Lists

founded 1 year ago
MODERATORS
 

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.

https://preview.redd.it/dtt6t2cf7fvb1.png?width=1279&format=png&auto=webp&s=3cad128718963d29032ee796f33057cc52b76f74

I am testing this on my windows machine locally but intend to host in a linux machine.

docker-compose file. https://pastebin.com/AVLrG4Ea

top 13 comments
sorted by: hot top controversial new old
[–] Protoype@alien.top 1 points 1 year ago (1 children)

Might sound silly, but instead of doing https://localhost:6875, try 127.0.0.1:6875 or you internal network ip (for testing until you get a domain) e.g. 192.168.0.1as might be a name resolving thing.

Also have you got TLS/HTTPS setup?

[–] shahisunil@alien.top 1 points 1 year ago

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.

[–] ssddanbrown@alien.top 1 points 1 year ago (1 children)

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.

[–] shahisunil@alien.top 1 points 1 year ago (1 children)

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.

[–] ssddanbrown@alien.top 1 points 1 year ago (1 children)

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.

[–] shahisunil@alien.top 1 points 1 year ago

Thanks will keep that in mind. Also thanks for all your work on this. Really looking forward to use this.

[–] davidnburgess34@alien.top 1 points 1 year ago (1 children)

Have you tried http instead of https in the compose file?

[–] shahisunil@alien.top 1 points 1 year ago

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

[–] selfguest@alien.top 1 points 1 year ago (2 children)

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?

[–] revereddesecration@alien.top 1 points 1 year ago

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.

[–] shahisunil@alien.top 1 points 1 year ago

I tried this. I was able to connect to the db. I was able to resolve this now after reading comment from u/ssddanbrown.

[–] gleepwurp1974@alien.top 1 points 1 year ago

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!

[–] ethereal_g@alien.top 1 points 1 year ago