feat(branding): customize Gita platform experience
giteabot backport / giteabot (push) Canceled after 0s
giteabot / giteabot (push) Canceled after 0s
release-nightly / nightly-binary (push) Canceled after 0s
release-nightly / nightly-container (push) Canceled after 0s
release-nightly-snapcraft / build-and-publish (push) Canceled after 0s

Assisted-by: Codex:GPT-5
This commit is contained in:
2026-08-16 07:45:24 +08:00
parent e4afba3416
commit 442ddc5f0d
27 changed files with 129 additions and 123 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash
[[ -f ./setup ]] && source ./setup
pushd /app/gitea >/dev/null
pushd /app/gita >/dev/null
exec su-exec $USER /usr/local/bin/gitea web
popd
+3 -3
View File
@@ -60,7 +60,7 @@ fi
environment-to-ini --config ${GITEA_CUSTOM}/conf/app.ini
# 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
if ! [[ $(ls -ld /data/gita | awk '{print $3}') = ${USER} ]]; then chown -R ${USER}:git /data/gita; fi
if ! [[ $(ls -ld /app/gita | awk '{print $3}') = ${USER} ]]; then chown -R ${USER}:git /app/gita; fi
if ! [[ $(ls -ld /data/git | awk '{print $3}') = ${USER} ]]; then chown -R ${USER}:git /data/git; fi
chmod 0755 /data/gitea /app/gitea /data/git
chmod 0755 /data/gita /app/gita /data/git
+10 -10
View File
@@ -5,13 +5,13 @@ RUN_MODE = $RUN_MODE
ROOT = /data/git/repositories
[repository.local]
LOCAL_COPY_PATH = /data/gitea/tmp/local-repo
LOCAL_COPY_PATH = /data/gita/tmp/local-repo
[repository.upload]
TEMP_PATH = /data/gitea/uploads
TEMP_PATH = /data/gita/uploads
[server]
APP_DATA_PATH = /data/gitea
APP_DATA_PATH = /data/gita
DOMAIN = $DOMAIN
SSH_DOMAIN = $SSH_DOMAIN
HTTP_PORT = $HTTP_PORT
@@ -22,7 +22,7 @@ SSH_LISTEN_PORT = $SSH_LISTEN_PORT
LFS_START_SERVER = $LFS_START_SERVER
[database]
PATH = /data/gitea/gitea.db
PATH = /data/gita/gita.db
DB_TYPE = $DB_TYPE
HOST = $DB_HOST
NAME = $DB_NAME
@@ -31,22 +31,22 @@ PASSWD = $DB_PASSWD
LOG_SQL = false
[indexer]
ISSUE_INDEXER_PATH = /data/gitea/indexers/issues.bleve
ISSUE_INDEXER_PATH = /data/gita/indexers/issues.bleve
[session]
PROVIDER_CONFIG = /data/gitea/sessions
PROVIDER_CONFIG = /data/gita/sessions
[picture]
AVATAR_UPLOAD_PATH = /data/gitea/avatars
REPOSITORY_AVATAR_UPLOAD_PATH = /data/gitea/repo-avatars
AVATAR_UPLOAD_PATH = /data/gita/avatars
REPOSITORY_AVATAR_UPLOAD_PATH = /data/gita/repo-avatars
[attachment]
PATH = /data/gitea/attachments
PATH = /data/gita/attachments
[log]
MODE = console
LEVEL = info
ROOT_PATH = /data/gitea/log
ROOT_PATH = /data/gita/log
[security]
INSTALL_LOCK = $INSTALL_LOCK
+1 -1
View File
@@ -30,7 +30,7 @@ if [ -n "${USER_UID}" ] && [ "${USER_UID}" != "`id -u ${USER}`" ]; then
sed -i -e "s/^${USER}:\([^:]*\):[0-9]*:\([0-9]*\)/${USER}:\1:${USER_UID}:\2/" /etc/passwd
fi
for FOLDER in /data/gitea/conf /data/gitea/log /data/git /data/ssh; do
for FOLDER in /data/gita/conf /data/gita/log /data/git /data/ssh; do
mkdir -p ${FOLDER}
done
+1 -1
View File
@@ -1,2 +1,2 @@
#!/bin/bash
exec /app/gitea/gitea config edit-ini --in-place --apply-env "$@"
exec /app/gita/gita config edit-ini --in-place --apply-env "$@"
+5 -5
View File
@@ -1,15 +1,15 @@
#!/bin/bash
###############################################################
# This script sets defaults for gitea to run in the container #
# This script sets defaults for Gita to run in the container #
###############################################################
# It assumes that you place this script as gitea in /usr/local/bin
#
# And place the original in /usr/lib/gitea with working files in /data/gitea
GITEA="/app/gitea/gitea"
WORK_DIR="/data/gitea"
CUSTOM_PATH="/data/gitea"
# And place the original in /app/gita with working files in /data/gita
GITEA="/app/gita/gita"
WORK_DIR="/data/gita"
CUSTOM_PATH="/data/gita"
# Provide docker defaults
GITEA_WORK_DIR="${GITEA_WORK_DIR:-$WORK_DIR}" GITEA_CUSTOM="${GITEA_CUSTOM:-$CUSTOM_PATH}" exec -a "$0" "$GITEA" $CONF_ARG "$@"