From 73e43a7cfdbe1973d419ad68a806adbaa651b597 Mon Sep 17 00:00:00 2001 From: casjay Date: Thu, 15 Aug 2024 16:34:24 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20Committing=20everything?= =?UTF-8?q?=20that=20changed=20=F0=9F=97=83=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rootfs/tmp/etc/gitea/app.ini rootfs/usr/local/etc/docker/init.d/08-gitea.sh --- rootfs/tmp/etc/gitea/app.ini | 4 ++-- rootfs/usr/local/etc/docker/init.d/08-gitea.sh | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/rootfs/tmp/etc/gitea/app.ini b/rootfs/tmp/etc/gitea/app.ini index 5ce907a..0320015 100644 --- a/rootfs/tmp/etc/gitea/app.ini +++ b/rootfs/tmp/etc/gitea/app.ini @@ -120,7 +120,7 @@ REPOSITORY_AVATAR_UPLOAD_PATH = REPLACE_DATA_DIR/av ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [log] MODE = console -LEVEL = info +LEVEL = warn LOG_ROTATE = true DAILY_ROTATE = true MAX_DAYS = 1 @@ -134,7 +134,7 @@ PASSWORD_HASH_ALGO = pbkdf2 MIN_PASSWORD_LENGTH = 8 PASSWORD_COMPLEXITY = on LOGIN_REMEMBER_DAYS = 365 -COOKIE_USERNAME = gitea_awesome +COOKIE_USERNAME = git_REPLACE_RANDOM_COOKIE_KEY REVERSE_PROXY_LIMIT = 1 REVERSE_PROXY_TRUSTED_PROXIES = * REVERSE_PROXY_AUTHENTICATION_USER = X-WEBAUTH-USER diff --git a/rootfs/usr/local/etc/docker/init.d/08-gitea.sh b/rootfs/usr/local/etc/docker/init.d/08-gitea.sh index 38eb65e..c1039f3 100755 --- a/rootfs/usr/local/etc/docker/init.d/08-gitea.sh +++ b/rootfs/usr/local/etc/docker/init.d/08-gitea.sh @@ -167,6 +167,7 @@ HOSTNAME="${GITEA_SERVER:-${GITEA_HOSTNAME:-${FULL_DOMAIN_NAME:-$HOSTNAME}}}" GITEA_SECRET_KEY="${GITEA_SECRET_KEY:-$(__random_password 32)}" GITEA_LFS_JWT_SECRET="${GITEA_LFS_JWT_SECRET:-$($EXEC_CMD_BIN generate secret LFS_JWT_SECRET)}" GITEA_INTERNAL_TOKEN="${GITEA_INTERNAL_TOKEN:-$($EXEC_CMD_BIN generate secret INTERNAL_TOKEN)}" +GITEA_RANDOM_COOKIE_KEY="${GITEA_RANDOM_COOKIE_KEY:-$(__random_password 16)}" [ "$GITEA_EMAIL_CONFIRM" = "yes" ] && GITEA_EMAIL_CONFIRM="true" export CUSTOM_PATH="$ETC_DIR" WORK_DIR="${GITEA_WORK_DIR:-$DATA_DIR}" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -239,6 +240,7 @@ __update_conf_files() { # replace variables __replace "REPLACE_SSH_CONF_DIR" "/config/ssh" "/etc/ssh/sshd_config" __replace "REPLACE_SSH_DATA_DIR" "$DATA_DIR/ssh" "/etc/ssh/sshd_config" + __replace "REPLACE_RANDOM_COOKIE_KEY" "$GITEA_RANDOM_COOKIE_KEY" "$CONF_DIR/app.ini" # replace variables recursively # __find_replace "" "" "$CONF_DIR"