linuxserver / docker-bookstack

A Docker container for the BookStack documentation wiki
GNU General Public License v3.0
797 stars 109 forks source link

fix substitution of APP_URL when provided #62

Closed klutchell closed 4 years ago

klutchell commented 4 years ago

linuxserver.io


We welcome all PR’s though this doesn’t guarantee it will be accepted.

Description:

Looking at the following line, I can see why APP_URL is not being applied in /config/www/.env

# set appurl if detected
[[ "${APP_URL}" ]] && sed -i "s,#\sAPP_URL.*,APP_URL=${APP_URL},g" /config/www/.env

This substitution is expecting # APP_URL but the example env file doesn't include a space: #APP_URL.

The workaround is to manually edit your /config/www/.env file and avoid providing environment variables that would cause it to be overwritten.

Benefits of this PR and context:

Fixes one of the symptoms described in https://github.com/linuxserver/docker-bookstack/issues/58

How Has This Been Tested?

I tested the new sed string from the command line, before copying the patched 50-config into the existing v0.29.3-ls99 image.

https://github.com/klutchell/balena-bookstack/commit/703a0ebe36ece339ebaf90f452099ad4ac2ff442

Source / References:

https://github.com/linuxserver/docker-bookstack/issues/58 https://github.com/klutchell/balena-bookstack/commit/703a0ebe36ece339ebaf90f452099ad4ac2ff442

LinuxServer-CI commented 4 years ago

I am a bot, here are the test results for this PR: https://lsio-ci.ams3.digitaloceanspaces.com/lspipepr/bookstack/v0.29.3-pkg-df7419fa-pr-62/index.html https://lsio-ci.ams3.digitaloceanspaces.com/lspipepr/bookstack/v0.29.3-pkg-df7419fa-pr-62/shellcheck-result.xml

LinuxServer-CI commented 4 years ago

I am a bot, here are the test results for this PR: https://lsio-ci.ams3.digitaloceanspaces.com/lspipepr/bookstack/v0.29.3-pkg-d49970ee-pr-62/index.html https://lsio-ci.ams3.digitaloceanspaces.com/lspipepr/bookstack/v0.29.3-pkg-d49970ee-pr-62/shellcheck-result.xml