zhangxiang
becb9407bd
feat(gitea): 升 28.2.0 并把品牌装饰层纳管为可重跑的仓库真源
...
自建 Gitea 此前是出厂外观(茶杯标 + 「Gitea: Git with a cup of tea」标题),而品牌「纯字标 + 朱砂条」已在官网落地;同时现网 1.27.2
落后两个安全版本 —— 1.27.3 的 fix(git): restrict hook permissions 打的正是本实例 8 月被入侵所用的 packObjectsHook
向量。装饰基准取自升级后从容器抽出的真实模板,不凭记忆手写。
- 升级 28.2.0:pg_dump 后还原到一次性探针库对账(116 表 / 20 仓库 / 8 用户全等),停服 8s;28.0.0 的 git egress BREAKING
按裁定收为 EGRESS_MODE=strict(实测 app.ini 无旧 ALLOWED_* 键、mirror 仓库 0 个 ⇒ 空白名单不伤业务)。
- 装饰层真源入库 infra/cicd/gitea-custom/(结构即实测 CustomPath=/data/gitea):页头/OG/默认头像换简标与刻版、novalon-
brand.css 覆盖 --color-primary 全色阶、custom/header.tmpl 外链注入、signin_inner.tmpl
登录页加字标锁定(220×103)。
- 色阶由脚本生成并自带夹具:先对上游 14 档对账(light/dark 两档 ramp 命名互为反向,手敲必错),再喂上游蓝做反向自证,双双通过才写盘。
- 深档按钮改「黑字朱底」:Gitea 用同一令牌既当按钮底色又当链接文字色,AA 区间为空(按钮白字 L≤0.1833 vs 链接 on #1e1f20 L≥0.2362)⇒ #E13C58
× #0D0D0D 实测 4.62:1;深档链接 3.92:1 作为已登记让步保留(上游蓝同位 4.14,本就不达标)。
- deploy/verify 带预检、备份、内容 sha256 比对、负对照与 0/1/2/3 退出码分档,核心判红自动回滚(首轮就靠它把「标题未生效」与「装饰未生效」区分开)。
- 纠正两处生产口径失真:仓库那份「加固版」compose 从未上线(真实文件纳管为 infra/cicd/gitea/docker-compose.live.yml);生产
REQUIRE_SIGNIN_VIEW 实为 false,且 compose 的 DISABLE_REGISTRATION=false 会经 environment-to-ini
在重建时静默打开注册 —— 已对齐为 true。遗留的匿名浏览面与 SSH_PORT 错配只登记不擅动。
2026-10-22 18:55:55 +08:00
zhangxiang
4ab2f3cd8e
chore(infra): 新增 Gitea+Jenkins CI/CD 部署与凭据整改
...
- infra/cicd:docker-compose(gitea/jenkins)、JCasC(凭据统一 ${ENV} 注入,无硬编码)、
备份/恢复、健康检查、凭据轮换与 git 历史清除脚本
- docs/deployment/cicd:安装、高可用备份监控、凭据事故复盘
- .env.example 仅为占位模板;真实 .env 由 .gitignore 排除
2026-09-20 10:37:57 +08:00
zhangxiang
af57504e8e
refactor(deploy): 统一发布脚本为单一入口 scripts/deploy.sh
...
- 新增 scripts/deploy.sh,支持 build/deploy/rollback/status 子命令
- 删除 deploy.sh、deploy-dist.sh、scripts/deploy-static.sh、scripts/deployment/deploy-production.sh
- Jenkinsfile 部署/回滚改为调用统一脚本,移除内联部署逻辑与 STATIC_DIR
- 同步 README、DEPLOYMENT、docs、CLAUDE.md、setup-cicd 与 package.json 脚本
2026-08-17 18:40:51 +08:00
张翔
8840c4398a
feat: downgrade tech stack to stable versions and integrate GA4 error monitoring
...
- Downgrade Next.js 16→14.2, React 19→18.3, Tailwind 4→3.4
- Add comprehensive GA4 error monitoring system
- Create Jenkins CI/CD pipeline with quality gates
- Fix build issues: ESLint, SWC conflict, config format
- Add documentation for deployment and error tracking
2026-05-12 12:45:18 +08:00
张翔
6403489954
refactor: 完成静态网站转换,移除所有 CMS 和动态功能
...
- 删除数据库相关代码 (src/db/)
- 删除 API 路由 (src/app/api/)
- 删除认证相关代码 (src/lib/auth/, src/providers/)
- 删除监控和安全中间件 (src/lib/security/, src/lib/monitoring/)
- 删除 hooks (use-news, use-products, use-services)
- 更新组件为静态数据源
- 添加 nginx 静态配置和部署脚本
- 添加 static-link 组件
2026-04-21 07:53:56 +08:00
张翔
498bb3a3c8
refactor: reorganize project structure and improve code quality
...
- Move CI/CD configs to config/ci/ directory
- Reorganize scripts into categorized directories (deployment, monitoring, testing, utils)
- Consolidate documentation into docs/ directory with proper structure
- Update linting and testing configurations
- Remove obsolete test reports and performance summaries
- Add new documentation for code quality tools and contact form security
- Improve project organization and maintainability
- Fix lint-staged config to only lint JS/TS files
- Disable react/react-in-jsx-scope rule for Next.js compatibility
- Ignore scripts and test config directories in ESLint
2026-03-24 13:38:58 +08:00
张翔
c06ac08510
docs: add quality gates documentation
2026-03-24 13:32:01 +08:00
张翔
8fd7ed84ed
docs: record Phase 1 deployment log
2026-03-10 18:08:54 +08:00
张翔
869864a695
docs: add Phase 1 deployment guide and rollback procedure
2026-03-10 17:41:13 +08:00