mirror of
https://github.com/hanzoai/forge.git
synced 2026-10-30 15:00:39 +00:00
The binary was gitea and admin work was `gitea admin ...`. Nothing in this fork
is Gitea, so the daemon is now `gitd`: EXECUTABLE, /app/gitd/gitd, the
/usr/local/bin/gitd wrapper, the s6 service, the CLI's own name, and the delegate
each repository's git hooks execute.
The delegate is the whole risk. Every repo on disk carries
hooks/<hook>.d/<binary> containing setting.AppPath verbatim, and the outer
hooks/<hook> runs EVERY executable in <hook>.d/ and rejects the push if any exits
non-zero. So this rename is a migration, not a rename, and it is safe only
because both halves move together:
* AppPath moves (/usr/local/bin/gitea -> /usr/local/bin/gitd), which is what
makes routers.syncAppConfForGit re-run SyncRepositoryHooks over every
repository on the first boot after the upgrade — and it runs inside
InitWebInstalled, i.e. before the listener opens, so no push can ever meet a
stale hook. `gitd admin regenerate hooks` remains the manual lever.
* createDelegateHooks now deletes legacyDelegateHookNames. Without it each repo
would keep BOTH hooks/<hook>.d/gitea and .../gitd, the stale one would exit
127, and every push would fail forever. It deletes LAST: dying midway leaves
two delegates and a loud failure, where deleting first would leave none and
silently bypass every server-side check.
* checkDelegateHooks reports a surviving legacy delegate before any other
check, so `doctor --fix` heals a repo the sync missed.
Anything OUTSIDE this repo that invokes the binary by absolute path must move in
the same change that bumps the image tag — today that is the oauth-sync init
container in hanzoai/universe, which runs /app/gitea/gitea.
Deleted rather than renamed: snap/ (published a snap literally named gitea),
contrib/service/* and contrib/fhs-compliant-script (service units for a gitea
binary we no longer build) and contrib/upgrade.sh (fetched upstream Gitea from
dl.gitea.com and installed it OVER ours). We ship one artifact, the container.
Deliberately untouched: /data/gitea, gitea.db, /var/lib/gitea, /etc/gitea. Those
are the durable volume layout of a live server, and moving them is a data
migration with nothing to do with the binary's name.
58 lines
1.2 KiB
INI
58 lines
1.2 KiB
INI
APP_NAME = $APP_NAME
|
|
RUN_USER = $RUN_USER
|
|
RUN_MODE = $RUN_MODE
|
|
|
|
[repository]
|
|
ROOT = $GIT_WORK_DIR/git/repositories
|
|
|
|
[repository.local]
|
|
LOCAL_COPY_PATH = $GIT_TEMP/local-repo
|
|
|
|
[repository.upload]
|
|
TEMP_PATH = $GIT_TEMP/uploads
|
|
|
|
[server]
|
|
APP_DATA_PATH = $GIT_WORK_DIR
|
|
SSH_DOMAIN = $SSH_DOMAIN
|
|
HTTP_PORT = $HTTP_PORT
|
|
ROOT_URL = $ROOT_URL
|
|
DISABLE_SSH = $DISABLE_SSH
|
|
; In the rootless container only the internal ssh server is supported
|
|
START_SSH_SERVER = true
|
|
SSH_PORT = $SSH_PORT
|
|
SSH_LISTEN_PORT = $SSH_LISTEN_PORT
|
|
BUILTIN_SSH_SERVER_USER = $RUN_USER
|
|
LFS_START_SERVER = $LFS_START_SERVER
|
|
|
|
[database]
|
|
PATH = $GIT_WORK_DIR/data/gitea.db
|
|
DB_TYPE = $DB_TYPE
|
|
HOST = $DB_HOST
|
|
NAME = $DB_NAME
|
|
USER = $DB_USER
|
|
PASSWD = $DB_PASSWD
|
|
|
|
[session]
|
|
PROVIDER_CONFIG = $GIT_WORK_DIR/data/sessions
|
|
|
|
[picture]
|
|
AVATAR_UPLOAD_PATH = $GIT_WORK_DIR/data/avatars
|
|
REPOSITORY_AVATAR_UPLOAD_PATH = $GIT_WORK_DIR/data/repo-avatars
|
|
|
|
[attachment]
|
|
PATH = $GIT_WORK_DIR/data/attachments
|
|
|
|
[log]
|
|
ROOT_PATH = $GIT_WORK_DIR/data/log
|
|
|
|
[security]
|
|
INSTALL_LOCK = $INSTALL_LOCK
|
|
SECRET_KEY = $SECRET_KEY
|
|
|
|
[service]
|
|
DISABLE_REGISTRATION = $DISABLE_REGISTRATION
|
|
REQUIRE_SIGNIN_VIEW = $REQUIRE_SIGNIN_VIEW
|
|
|
|
[lfs]
|
|
PATH = $GIT_WORK_DIR/git/lfs
|