BookStack is a well-maintained documentation platform and web application that allows for organizing notes with a basic book, chapter, page structure. Books can then be ‘Shelved’ with similar books, and further organized with images / permissions. Check out the Official BookStack Website for more information and documentation on some of the other features BookStack offers.
When looking for a central place to store notes on various projects, there were many possible solutions that didn’t require the use of Docker, NGINX, Git, Markdown, or Linux. The benefit of hosting a personal notes / documentation application for me is seen in my ability to manually backup my documentation or migrate my service to another platform if needed. This may seem like two very simple requests, but when migrating between services issues can surface due to the service’s need for a specific file structure, syntax, or other dependency. This is where BookStack’s use of Markdown language within its post editor is helpful. Since we can create posts with Markdown and count on BookStack to translate the content as needed on the back-end, our content remains independent from the specifics of the BookStack platform itself, allowing us to simply copy over our content to another platform, should we ever want to make a move.
The following table is a quoted from the Markdown Documentation hosted on the BookStack website.
Ctrl-9 to insert a callout within your post, you will notice some HTML is input within your Markdown editor. BookStack offers info, warning, and danger callouts. Simply change the info callout snippet inserted when using
Ctrl+9 to any of the below to use them.
<p class="callout info"></p>
Knoats is my personal project in linux administation and documentation – it is open for signup, and the only reason for doing so is to see and comment on less polished content. There are a few books and pages that can be edited (text only) if you are logged in, but for the most part this is public only to share the information I’ve learned along the way and isn’t intended to be a service to anyone other than myself. That being said, I hope some of the information hosted there can serve anyone who may be passing through, as that’s the sole reason I’ve decided to make it public.
I’m open to collaboration where appropriate – it is possible for me to on-board others as I see fit to edit the documentation hosted on Knoats. Chances are, I’ll be willing to set up your account to have the appropriate permissions. I hope to one day be able to use this project to collaborate on well built documentation for projects controlled via Git or otherwise worked remote.
LinuxServer provides a Docker image which is well maintained and updated as the main BookStack Repository is versioned. They also host a good bit of information on other images and current / upcoming projects at LinuxServer.io, which is a good central location to begin exploring if you are looking to learn about Docker images. Their images are not only well-maintained, but they have an active community which can be easily found by reading through their blog or joining their Discord server which is linked on all of their repositories. These are volunteers and enthusiasts, so please approach them appropriately if you are requesting support on an image or repository they are hosting.
For running a containerized version of BookStack, I ran into some discrepancies from the general BookStack documentation vs actual implementation of the LinuxServer image, especially when dealing with networking and the termination of SSL. There are many solutions and sources to these problems if you have never hosted an application with Docker, and I found realizing these differences to be a positive and well documented learning experience. There may be a full end-to-end tutorial out there somewhere for this specific image, but I simply pulled the image via docker compose and reconfigured as needed to resolve the issues I faced. This gave me an opportunity to learn a bit about Networking, Docker, Compose, and Linux in general.
LinuxServer’s Docker BookStack repository
Below are some snippets related to the changes I had to make to get the BookStack container running. Feel free to reference them as needed for any projects you might be working on.
I’ll reiterate here what I went over on the WordPress Docker explanation -
Its important to note above that the volumes we define carry the syntax local:container when defining the path to be mounted, and we don’t need to initialize any directories / configurations in general. When the container starts the first time, directories and files will be created and any volumes defined in the docker-compose.yml used to create the service will be mounted so that the files on the container are available locally on the host. This is a useful tool to help ease the task of automating or scheduling backups and also makes the configurations on the container easier to modify using our local settings and packages.
docker-compose.yml was taken directly from the default provided by LinuxServer
# A simple nginx.conf showing how to pass traffic to a docker container