Files
IOT_SIM/.gitignore
T
xuyueandClaude Opus 5.5 4c3ce31fe1
Deploy / deploy (push) Successful in 1m38s
部署:push origin 就由开发机编好、测过再传到服务器,服务器不再自己编,push 后一两分钟上线。照 OJ2 的做法,开发机上的 gitea-runner(和 OJ2 共用,标签 iot-deploy,一次只跑一个任务)跑 .gitea/workflows/deploy.yml:编 C# 运行时(Release)、网页和 server.js,跑服务端测试(用要上线的 Release 版运行时)、网页端测试和类型检查,产物 rsync 到服务器的 prebuilt/(按内容比、传完才换上、断了重试),服务器上 deploy/update.sh --prebuilt 用现成产物构建镜像,只剩几条 COPY。以前 GitHub 上测试约 5 分钟、服务器 2 核再编约一分钟(编的时候学生程序会卡),push 后 6 分钟多才上线。host 模式用开发机自己的 ssh 和 git 访问,不需要 secret。Dockerfile 加构建参数 ARTIFACTS(build 默认在镜像里编 / prebuilt 用现成产物),服务器自己编的能力保留;prebuilt/COMMIT 和要部署的提交对不上时 update.sh 直接失败。服务端测试同时跑:文件之间 --parallel,评分测试标 describe.concurrent(--max-concurrency=8),本机 4 分钟降到半分钟,连跑三遍都通过。GitHub 的 ci.yml 改成 PR 跑测试、手动触发才部署(服务器自己编),开发机不在时用,push 不再两边各部署一遍。顺手:update.sh 每次部署拉一下 caddy:2-alpine(up 不会自己拉,一直是第一次部署时那份);app 和 caddy 的容器日志限 10MB × 3。部署说明、README、设计方案同步
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 12:08:14 +08:00

33 lines
590 B
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.
# 依赖与构建产物
node_modules/
dist/
bin/
obj/
*.tsbuildinfo
# 运行时临时目录
.runs/
# 教材资料(体积大、有版权,不进仓库)
物联网编程与应用配套/
# 导出 EXE 用的教材设备类库(真机版 dll),部署时放在服务器上挂进容器
/textbook-libs/
*.pdf
# 编辑器
.vscode/
.idea/
.DS_Store
# 部署配置(含访问口令)
.env
# 本机开发的数据库
/data/
# 服务器上 deploy/backup.sh 做的备份
/backups/
# 开发机上的 gitea-runner 编好传到服务器的产物(.gitea/workflows/deploy.yml)
/prebuilt/