diff options
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | entrypoint.sh | 6 |
2 files changed, 10 insertions, 0 deletions
@@ -83,6 +83,10 @@ docker run -d \ | |||
83 | 83 | ||
84 | Default assets will be automatically installed in the `/www/assets` directory. Use `UID` and/or `GID` env var to change the assets owner (`docker run -e "UID=1000" -e "GID=1000" [...]`). | 84 | Default assets will be automatically installed in the `/www/assets` directory. Use `UID` and/or `GID` env var to change the assets owner (`docker run -e "UID=1000" -e "GID=1000" [...]`). |
85 | 85 | ||
86 | ## Host in subfolder | ||
87 | |||
88 | If you would like to host Homer in a subfolder, for e.g. behind a reverse proxy, supply the name of subfolder by using the `SUBFOLDER` env var. | ||
89 | |||
86 | ### Using docker-compose | 90 | ### Using docker-compose |
87 | 91 | ||
88 | The `docker-compose.yml` file must be edited to match your needs. | 92 | The `docker-compose.yml` file must be edited to match your needs. |
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" |