fix: keep Gitea app.ini writable on current recipe
cc-ci/testme cc-ci: success

This commit is contained in:
notplants
2026-11-02 18:31:19 +00:00
parent 372d5ae9da
commit 421ecb06f3
3 changed files with 11 additions and 3 deletions
+8
View File
@@ -13,3 +13,11 @@ mkdir -p ${GITEA_CUSTOM} && chmod 0500 ${GITEA_CUSTOM}
# Prepare temp folder
mkdir -p ${GITEA_TEMP} && chmod 0700 ${GITEA_TEMP}
if [ ! -w ${GITEA_TEMP} ]; then echo "${GITEA_TEMP} is not writable"; exit 1; fi
# Gitea writes settings such as WORK_PATH back to app.ini on boot. The Swarm
# config is read-only, so seed a writable copy on the persistent config volume.
# Old direct-mount deployments may leave an empty app.ini behind.
if [ ! -s /etc/gitea/app.ini ]; then
cp /etc/gitea/app.ini.init /etc/gitea/app.ini
fi
chmod 0600 /etc/gitea/app.ini 2>/dev/null || true