This website requires JavaScript.
0
Issues
Pull Requests
Milestones
Explore
0
Create…
New Repository
New Migration
New Organization
admin
Signed in as
admin
Profile
Starred
Subscriptions
Settings
Help
Site Administration
Sign Out
admin
/
homelab
Watching
1
Participating and mentions
Receive notifications from this repository when participating or mentioned.
All activity
Receive notifications for all events.
Ignore
Never receive notifications from this repository.
Custom
Select events you want to be notified of, in addition to participating and mentions.
Star
0
Fork
0
Notifications
Issues
Pull Requests
Releases
Cancel
Confirm
Code
Issues
Pull Requests
Actions
Packages
Projects
Releases
Wiki
Activity
Settings
Files
homelab
/
scripts
/
or
Cancel
Edit File
Preview
Preview Changes
Spaces
Tabs
2
4
8
Wrap
No wrap
#!/usr/bin/env bash # ============================================================================== # start-gitea.sh — 启动 Gitea 私有代码托管中枢 (Mac SSD 热层 + 极空间 NAS 冷层归档) # HTTP 端口: 3005 | 内置 Git SSH 端口: 2222 # ============================================================================== set -euo pipefail export HOME="/Users/ixvii0iv" export USER="ixvii0iv" export USERNAME="ixvii0iv" export LANG="en_US.UTF-8" export LC_ALL="en_US.UTF-8" export PATH="/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" HOT_DIR="/Users/ixvii0iv/homelab/stacks/git" mkdir -p "$HOT_DIR/data/repositories" \ "$HOT_DIR/data/lfs" \ "$HOT_DIR/data/attachments" \ "$HOT_DIR/data/packages" \ "$HOT_DIR/data/repo-archive" \ "$HOT_DIR/custom/conf" \ "$HOT_DIR/log" CONF_FILE="$HOT_DIR/custom/conf/app.ini" if [ ! -f "$CONF_FILE" ]; then SECRET_KEY=$(/opt/homebrew/opt/gitea/bin/gitea generate secret SECRET_KEY) INTERNAL_TOKEN=$(/opt/homebrew/opt/gitea/bin/gitea generate secret INTERNAL_TOKEN) JWT_SECRET=$(/opt/homebrew/opt/gitea/bin/gitea generate secret JWT_SECRET) LFS_JWT_SECRET=$(/opt/homebrew/opt/gitea/bin/gitea generate secret LFS_JWT_SECRET) cat > "$CONF_FILE" <<EOF APP_NAME = HomeLab Git Hub (Mac SSD Hot + ZSpace 20TB Cold) RUN_USER = ixvii0iv RUN_MODE = prod WORK_PATH = $HOT_DIR [server] PROTOCOL = http DOMAIN = git.961504.xyz ROOT_URL = https://git.961504.xyz/ HTTP_ADDR = 0.0.0.0 HTTP_PORT = 3005 DISABLE_SSH = false START_SSH_SERVER = true SSH_DOMAIN = 192.168.31.164 SSH_PORT = 2222 SSH_LISTEN_PORT = 2222 LFS_START_SERVER = true LFS_JWT_SECRET = $LFS_JWT_SECRET OFFLINE_MODE = false [database] DB_TYPE = sqlite3 PATH = $HOT_DIR/data/gitea.db [repository] ROOT = $HOT_DIR/data/repositories DEFAULT_BRANCH = main [lfs] STORAGE_TYPE = local PATH = $HOT_DIR/data/lfs [attachment] STORAGE_TYPE = local PATH = $HOT_DIR/data/attachments MAX_SIZE = 2048 MAX_FILES = 50 [packages] STORAGE_TYPE = local PATH = $HOT_DIR/data/packages [repo-archive] STORAGE_TYPE = local PATH = $HOT_DIR/data/repo-archive [security] INSTALL_LOCK = true SECRET_KEY = $SECRET_KEY INTERNAL_TOKEN = $INTERNAL_TOKEN PASSWORD_HASH_ALGO = pbkdf2 REVERSE_PROXY_TRUSTED_PROXIES = 127.0.0.0/8,100.64.0.0/10,192.168.0.0/16,::1/128 [oauth2] JWT_SECRET = $JWT_SECRET [service] DISABLE_REGISTRATION = true REQUIRE_SIGNIN_VIEW = false ENABLE_NOTIFY_MAIL = false ENABLE_REVERSE_PROXY_AUTHENTICATION = true ENABLE_REVERSE_PROXY_AUTO_REGISTRATION = true REVERSE_PROXY_AUTHENTICATION_USER = X-Webauth-User [log] MODE = console LEVEL = Info ROOT_PATH = $HOT_DIR/log EOF fi exec /opt/homebrew/opt/gitea/bin/gitea web --work-path "$HOT_DIR" --custom-path "$HOT_DIR/custom" --config "$CONF_FILE"
Commit Changes
Add a Signed-off-by trailer by the committer at the end of the commit log message.
Commit directly to the
main
branch.
Create a
new branch
for this commit and start a pull request.
Commit Changes
Cancel