From e793e3d76d79ee5d5f42a5c35f6fefbb2a1c1026 Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Tue, 4 Nov 2025 16:54:58 +0100 Subject: [PATCH] Create public folder relative to GITEA_CUSTOM in Docker setup It may not be apparent where a custom robots.txt or such should go in the absence of a 'custom' or 'public' folder. --- docker/root/etc/s6/gitea/setup | 3 +++ docker/rootless/usr/local/bin/docker-setup.sh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/docker/root/etc/s6/gitea/setup b/docker/root/etc/s6/gitea/setup index b801ef4e03540..b4718686f3806 100755 --- a/docker/root/etc/s6/gitea/setup +++ b/docker/root/etc/s6/gitea/setup @@ -59,6 +59,9 @@ fi # Replace app.ini settings with env variables in the form GITEA__SECTION_NAME__KEY_NAME environment-to-ini --config ${GITEA_CUSTOM}/conf/app.ini +# Create public folder so the user knows where things such as robots.txt should go +mkdir -p ${GITEA_CUSTOM}/public + # only chown if current owner is not already the gitea ${USER}. No recursive check to save time if ! [[ $(ls -ld /data/gitea | awk '{print $3}') = ${USER} ]]; then chown -R ${USER}:git /data/gitea; fi if ! [[ $(ls -ld /app/gitea | awk '{print $3}') = ${USER} ]]; then chown -R ${USER}:git /app/gitea; fi diff --git a/docker/rootless/usr/local/bin/docker-setup.sh b/docker/rootless/usr/local/bin/docker-setup.sh index feab02a3793c1..2cf28d6e52972 100755 --- a/docker/rootless/usr/local/bin/docker-setup.sh +++ b/docker/rootless/usr/local/bin/docker-setup.sh @@ -49,3 +49,6 @@ fi # Replace app.ini settings with env variables in the form GITEA__SECTION_NAME__KEY_NAME environment-to-ini --config ${GITEA_APP_INI} + +# Create public folder so the user knows where things such as robots.txt should go +mkdir -p ${GITEA_CUSTOM}/public