aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/docker/entrypoint.sh
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2022-12-03 09:50:12 +0100
committerEgor Tensin <Egor.Tensin@gmail.com>2022-12-03 10:03:09 +0100
commit0dbd4c12488bd365a86e4726b2ae689b2da86a7c (patch)
treec1c543aca8916cd93ce23900ba9a8c1f48529fb0 /docker/entrypoint.sh
parentv4.0.3 (diff)
downloadcgitize-0dbd4c12488bd365a86e4726b2ae689b2da86a7c.tar.gz
cgitize-0dbd4c12488bd365a86e4726b2ae689b2da86a7c.zip
frontend: fix /mnt/cgitize being inaccessible to nginx
I've had problems with doing "FROM nginx" instead of "FROM alpine" in the past, but hopefully fixing a version is enough to prevent them.
Diffstat (limited to '')
-rwxr-xr-xdocker/entrypoint.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh
index 61ecd1e..4ca1304 100755
--- a/docker/entrypoint.sh
+++ b/docker/entrypoint.sh
@@ -14,6 +14,11 @@ secure_repo_dir() {
local dir
dir="$( /get_output_dir.py -- "$cfg_path" )"
chmod -- o-rwx "$dir"
+
+ # This is required so that nginx can access the directory.
+ # nginx uses a fixed UID:
+ # https://github.com/nginxinc/docker-nginx/blob/4785a604aa40e0b0a69047a61e28781a2b0c2069/mainline/alpine-slim/Dockerfile#L16
+ chown -- :101 "$dir"
}
schedule_to_cron() {