Files
server-deploy/gitea/.env.example
2026-04-06 22:50:35 +08:00

59 lines
2.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ============================================
# Gitea 部署环境变量配置
# 复制此文件为 .env 并修改对应值
# ============================================
# ---- 域名配置(必改!)----
# 你的域名,需提前解析 A 记录到服务器 IP
GITEA_DOMAIN=git.example.com
# 用于申请 SSL 证书的邮箱
CERTBOT_EMAIL=admin@example.com
# ---- 服务器目录配置 ----
# 部署目录docker-compose.yml、脚本、.env 所在目录)
INSTALL_DIR=/opt/gitea
# Gitea 应用数据仓库、LFS、附件、头像、SSH/GPG 密钥)
GITEA_DATA_DIR=/var/lib/gitea
# MySQL 数据库文件
MYSQL_DATA_DIR=/var/lib/mysql/gitea
# 备份文件存放目录
BACKUP_DIR=/var/backups/gitea
# ---- Gitea 镜像配置 ----
# 官方最新镜像地址: docker.gitea.com/gitea:1.25.5
# Docker Hub 镜像: gitea/gitea:1.25 (默认,可被国内加速源加速)
# 如果服务器在海外或不需要加速,可切换为官方地址
GITEA_IMAGE=gitea/gitea:1.25
# ---- Docker 镜像加速(国内服务器建议配置)----
# 多个镜像用逗号分隔,留空则不配置加速
# 常用镜像源2026 年可用,按稳定性排序):
# https://docker.1ms.run — 1ms 公益加速
# https://docker.m.daocloud.io — DaoCloud 公开镜像
# https://docker.xuanyuan.me — 轩辕镜像
# https://dockerpull.org — DockerPull 公益
# https://docker.rainbond.cc — Rainbond 社区
# https://docker.udayun.com — 优达云
# https://docker.211678.top — 211678 加速
# https://hub.rat.dev — RatDev 公益
# 提示: 镜像源可能随时失效,部署前可 curl 测试连通性
DOCKER_REGISTRY_MIRRORS=https://docker.1ms.run,https://docker.m.daocloud.io,https://dockerpull.org,https://docker.rainbond.cc,https://docker.udayun.com,https://hub.rat.dev
# ---- 数据库密码deploy.sh 自动生成,无需手动填)----
DB_PASSWORD=请替换为强密码
DB_ROOT_PASSWORD=请替换为ROOT强密码
# ---- 端口配置 ----
# SSH 克隆端口(对外暴露)
SSH_PORT=2222
# ---- GPG 签名配置 ----
GPG_SIGNING_NAME=Gitea
GPG_SIGNING_EMAIL=gitea@example.com
# ---- 安全设置 ----
# 部署完成并创建管理员账户后,建议设为 true 关闭公开注册
DISABLE_REGISTRATION=false
# 是否要求登录才能浏览(私有部署建议 true
REQUIRE_SIGNIN=false