目录

sunearthl2.cn 全站基础设施

灾难恢复 / 快速回滚用全量代码与配置仓库

目录结构

sunearthl2-infra/
├── nginx/                  # Nginx 配置
│   ├── nginx.conf          # 主配置
│   └── conf.d/             # 18 个子站配置
├── systemd/                # Systemd 自定义服务
├── crontab/                # Crontab 定时任务定义
├── scripts/
│   ├── opt/                # /opt 下所有 Python 脚本(新闻抓取/翻译/推送等)
│   ├── ride-server/        # AutoRideTester 数据上传服务
│   └── autoRideTester/     # AutoRideTester 安卓客户端源码
├── sites/                  # /var/www 下所有网站代码
│   ├── agent-learn/        # learn.sunearthl2.cn (Agent 学习站)
│   ├── agent-news/         # agent.sunearthl2.cn (新闻聚合)
│   ├── auto-driving-news/  # auto.sunearthl2.cn
│   ├── embodied-ai-news/   # embodiedai.sunearthl2.cn
│   ├── face-news/          # face.sunearthl2.cn
│   ├── test-news/          # test.sunearthl2.cn
│   ├── x-news/             # x.sunearthl2.cn
│   ├── vla-tech/           # vla.sunearthl2.cn
│   ├── vln-tech/           # vln.sunearthl2.cn
│   ├── parking-demo/       # parking.sunearthl2.cn
│   ├── game-snake/         # game.sunearthl2.cn
│   ├── coord-tool/         # coord.sunearthl2.cn
│   ├── smart-driving/      # smart driving 页面
│   ├── city-noa-rank/      # 城市NOA排行榜
│   ├── hsd-vehicles/       # HSD车辆数据
│   ├── wechat-articles/    # 微信公众号文章输出
│   └── apk-files/          # APK 下载站
└── SECRETS.md              # 密钥/密码恢复指南(详见下方)

恢复步骤

1. 恢复 Nginx

cp nginx/nginx.conf /etc/nginx/nginx.conf
cp nginx/conf.d/*.conf /etc/nginx/conf.d/
nginx -t && systemctl reload nginx

2. 恢复 Systemd 服务

cp systemd/*.service /etc/systemd/system/
systemctl daemon-reload
systemctl enable --now parking-server apk-file-station

3. 恢复定时任务

crontab crontab/root.crontab

4. 恢复脚本

cp scripts/opt/*.py /opt/
cp scripts/opt/*.sh /opt/
chmod +x /opt/*.sh

5. 恢复网站

# 逐站复制,注意权限
for site in sites/*/; do
    name=$(basename $site)
    mkdir -p /var/www/$name
    cp -r $site/* /var/www/$name/
done

6. 填回密钥

参见 SECRETS.md — 所有 ***REDACTED*** 标记处需手动填入真实值。

排除项(不在仓库中)

  • SSL 证书私钥(/etc/letsencrypt/live/
  • 大于 1MB 的媒体文件(视频/图片/数据)
  • .env 文件
  • 构建产物(AutoRideTester 的 build/ 目录)
  • 日志文件、缓存、pycache
  • files-station 上传文件(2.8GB)
  • ai-talks 视频内容(1.5GB)

技术栈

组件 技术
Web 服务器 Nginx
SSL Let’s Encrypt (certbot)
后端语言 Python 3 (Flask/FastAPI)
路径规划 CasADi/IPOPT
数据库 JSON 文件(无传统DB)
容器化 Docker (SearXNG)
安卓客户端 Kotlin (AutoRideTester)

维护者

ridepulse lagrange4@163.com

关于

sunearthl2.cn 全站基础设施 — Nginx配置/Systemd服务/Crontab/Python脚本/网站代码

1.3 MB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802047560号