diff options
author | Bernhard Großer <bernhard.grosser@gmail.com> | 2021-06-21 19:33:21 +0200 |
---|---|---|
committer | Bastien Wirtz <bastien.wirtz@gmail.com> | 2022-04-30 10:46:00 +0200 |
commit | caf5fae8a849f740a603e0377be75df2043fae7f (patch) | |
tree | 57083f39951294a93219b5ad253b596f365101c6 /entrypoint.sh | |
parent | af0a6e89c9104ed69766e41f032a4b610ef67ccd (diff) | |
download | homer-caf5fae8a849f740a603e0377be75df2043fae7f.tar.gz homer-caf5fae8a849f740a603e0377be75df2043fae7f.tar.zst homer-caf5fae8a849f740a603e0377be75df2043fae7f.zip |
Added feature for subfolder hosting
By setting the SUBFOLDER env var, you can host Homer in a subfolder behind a reverse proxy.
Diffstat (limited to 'entrypoint.sh')
-rw-r--r-- | entrypoint.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/entrypoint.sh b/entrypoint.sh index f1a8c22..9da2615 100644 --- a/entrypoint.sh +++ b/entrypoint.sh | |||
@@ -11,5 +11,11 @@ fi | |||
11 | # Install default config if no one is available. | 11 | # Install default config if no one is available. |
12 | yes n | cp -i /www/default-assets/config.yml.dist /www/assets/config.yml &> /dev/null | 12 | yes n | cp -i /www/default-assets/config.yml.dist /www/assets/config.yml &> /dev/null |
13 | 13 | ||
14 | # Create symbolic link for hosting in subfolder. | ||
15 | if [[ -n "${SUBFOLDER}" ]]; then | ||
16 | ln -s /www "/www/$SUBFOLDER" | ||
17 | chown -h $USER:$GROUP "/www/$SUBFOLDER" | ||
18 | fi | ||
19 | |||
14 | chown -R $UID:$GID /www/assets | 20 | chown -R $UID:$GID /www/assets |
15 | exec su-exec $UID:$GID darkhttpd /www/ --no-listing --port "$PORT" | 21 | exec su-exec $UID:$GID darkhttpd /www/ --no-listing --port "$PORT" |