BookStack

da gist

This took a while to get going, mostly because of LDAP. For this, I used the first launch to write my env file then I mounted that internally. I had to rewrite the LDAP user field, because the $ was being left out. The next launch would likely be simpler by just writing the env file by hand.

https://blog.rylander.io/2017/06/09/install-and-configure-bookstack-using-docker-and-ldap/

https://gist.github.com/mry/89a93f4f777a277e3b6039972823ca9a

These include the necessary environmental variables I didnt find elsewhere

You may find that you cannot log in with your initial Admin account after changing the AUTH_METHOD to ldap. To get around this set the AUTH_METHOD to standard, login with your admin account then change it back to ldap. You get then edit your profile and add your LDAP uid under the ‘External Authentication ID’ field. You will then be able to login in with that ID.

$$

https://github.com/BookStackApp/BookStack/issues/414

Specific to running BookStack inside a Docker container and populating the environment variables.

For Feature Requests Update documentation to either include a clarifying note or include setting in example.

use double $$ since we are using docker

  • LDAP_USER_FILTER=(&(sAMAccountName=$${user})) Expected Behavior The PHP variable is expanded within BookStack and the LDAP query matches as expected.

Actual Behavior With the single $ sign, the expression becomes a static string and the query will never return a > result and no error message is thrown. Can be verified by replacing with a proper username.

Just a note. I had to map my .env file as a volume, and then manually edit this field to "LDAP_USER_FILTER=(&(sAMAccountName=${user}))". Even with this $$ trick that I found elsewhere it seems like the file was written with strange characters or just no $'s at all.