From caf5fae8a849f740a603e0377be75df2043fae7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernhard=20Gro=C3=9Fer?= Date: Mon, 21 Jun 2021 19:33:21 +0200 Subject: Added feature for subfolder hosting By setting the SUBFOLDER env var, you can host Homer in a subfolder behind a reverse proxy. --- entrypoint.sh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'entrypoint.sh') diff --git a/entrypoint.sh b/entrypoint.sh index f1a8c22..9da2615 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -11,5 +11,11 @@ fi # Install default config if no one is available. yes n | cp -i /www/default-assets/config.yml.dist /www/assets/config.yml &> /dev/null +# Create symbolic link for hosting in subfolder. +if [[ -n "${SUBFOLDER}" ]]; then + ln -s /www "/www/$SUBFOLDER" + chown -h $USER:$GROUP "/www/$SUBFOLDER" +fi + chown -R $UID:$GID /www/assets exec su-exec $UID:$GID darkhttpd /www/ --no-listing --port "$PORT" -- cgit v1.2.3