feat(mailer): configure Tencent SES defaults
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 08:10:28 +08:00
parent 442ddc5f0d
commit 2bd534fd5e
5 changed files with 82 additions and 0 deletions
+3
View File
@@ -120,3 +120,6 @@ prime/
# A Makefile for custom make targets
Makefile.local
# Local deployment secrets
/contrib/roncarve/.env
+2
View File
@@ -0,0 +1,2 @@
# Copy this file to .env and replace the placeholder with the SMTP password.
GITEA__mailer__PASSWD=replace-with-tencent-ses-smtp-password
+10
View File
@@ -1,5 +1,11 @@
# Gita 本地 Docker
复制 `.env.example``.env`,并填写腾讯云邮件推送 SMTP 密码:
```powershell
Copy-Item contrib/roncarve/.env.example contrib/roncarve/.env
```
启动:
```powershell
@@ -10,8 +16,12 @@ docker compose -f contrib/roncarve/compose.local.yaml up -d --build
首次启动会进入安装页面。完成初始化后,管理员账号和数据保存在 `roncarve-gita-local-data` 卷中;SSH 地址为 `ssh://git@localhost:2222`
邮件默认使用腾讯云香港区 `smtp.qcloudmail.com:465`,发信地址为 `noreply@git.roncarve.com`,密码仅保存在不纳入 Git 的 `.env` 文件中。
停止但保留数据:
```powershell
docker compose -f contrib/roncarve/compose.local.yaml down
```
生产环境使用 `compose.production.yaml`,通过外部 `gateway_gateway` 网络接入现有 Caddy,数据目录为 `/opt/gita/data`
+9
View File
@@ -6,6 +6,8 @@ services:
image: roncarve/gita:1.27.2-local
container_name: roncarve-gita-local
restart: unless-stopped
env_file:
- .env
ports:
- "127.0.0.1:3300:3000"
- "127.0.0.1:2222:22"
@@ -24,7 +26,14 @@ services:
GITEA__server__SSH_PORT: "2222"
GITEA__server__ROOT_URL: http://localhost:3300/
GITEA__service__DISABLE_REGISTRATION: "true"
GITEA__service__ENABLE_NOTIFY_MAIL: "true"
GITEA__service__ENABLE_PASSKEY_AUTHENTICATION: "false"
GITEA__mailer__ENABLED: "true"
GITEA__mailer__PROTOCOL: smtps
GITEA__mailer__SMTP_ADDR: smtp.qcloudmail.com
GITEA__mailer__SMTP_PORT: "465"
GITEA__mailer__FROM: '"代码协作平台-海南荣刻科技有限公司" <noreply@git.roncarve.com>'
GITEA__mailer__USER: noreply@git.roncarve.com
GITEA__openid__ENABLE_OPENID_SIGNIN: "false"
GITEA__openid__ENABLE_OPENID_SIGNUP: "false"
GITEA__ui__DEFAULT_THEME: gitea-light
+58
View File
@@ -0,0 +1,58 @@
services:
gita:
build:
context: ../..
dockerfile: Dockerfile
image: roncarve/gita:1.27.2-production
container_name: gitea
hostname: git.roncarve.com
restart: unless-stopped
env_file:
- .env
ports:
- "2222:22"
environment:
USER_UID: "1000"
USER_GID: "1000"
GITEA_WORK_DIR: /data/gita
GITEA_CUSTOM: /data/gita
GITEA____APP_NAME: Gita 代码协作平台
GITEA__database__DB_TYPE: sqlite3
GITEA__database__PATH: /data/gita/gita.db
GITEA__server__PROTOCOL: http
GITEA__server__HTTP_ADDR: 0.0.0.0
GITEA__server__HTTP_PORT: "3000"
GITEA__server__DOMAIN: git.roncarve.com
GITEA__server__SSH_DOMAIN: git.roncarve.com
GITEA__server__SSH_PORT: "2222"
GITEA__server__ROOT_URL: https://git.roncarve.com/
GITEA__security__INSTALL_LOCK: "true"
GITEA__service__DISABLE_REGISTRATION: "true"
GITEA__service__ENABLE_NOTIFY_MAIL: "true"
GITEA__service__ENABLE_PASSKEY_AUTHENTICATION: "false"
GITEA__mailer__ENABLED: "true"
GITEA__mailer__PROTOCOL: smtps
GITEA__mailer__SMTP_ADDR: smtp.qcloudmail.com
GITEA__mailer__SMTP_PORT: "465"
GITEA__mailer__FROM: '"代码协作平台-海南荣刻科技有限公司" <noreply@git.roncarve.com>'
GITEA__mailer__ENVELOPE_FROM: noreply@git.roncarve.com
GITEA__mailer__USER: noreply@git.roncarve.com
GITEA__openid__ENABLE_OPENID_SIGNIN: "false"
GITEA__openid__ENABLE_OPENID_SIGNUP: "false"
GITEA__ui__DEFAULT_THEME: gitea-light
GITEA__ui_0x2E_meta__AUTHOR: Hainan Roncarve Technology Co., Ltd.
GITEA__ui_0x2E_meta__DESCRIPTION: Gita 代码协作平台
GITEA__ui_0x2E_meta__KEYWORDS: roncarve,gita,go,git,code-collaboration
volumes:
- /opt/gita/data:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
networks:
gateway:
aliases:
- gitea
networks:
gateway:
external: true
name: gateway_gateway