原理图/PCB 已在 EasyEDA 里做到 12 页跨页 0 漏接,固件刚完成骨架包 A1。 这次是把已有的一切一次性纳入版本控制,没有改动任何设计内容。 纳入: - 设计与需求文档、PROGRESS.md、小米8 参考原理图 PDF 与追脚脚本 - .claude/ 下的 EasyEDA 桥接工具链与几何/网表缓存(eda-parts.json、 pcb-parts.json、pcb-pads.json、p2-ch1.json 等,是重画各页的唯一事实来源) - 117 张验证截图(本项目所有方向问题都是靠人眼看截图发现的,属于证据不是垃圾) - firmware/ 的 A1 骨架与 site/ 文档站源码 .gitignore 排除:构建产物(firmware/build、host/build、sdkconfig)、 site/node_modules、__pycache__、桥接日志 _bridge.log、脚本自标的 *.stale。 .gitattributes 默认 `* -text`:现有 .py/.json 大多是 CRLF,原样存, 不让 git 重写行尾。唯一例外是 *.sh 强制 LF —— 带 \r 的 shell 脚本 bash 跑不了。 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01QYuExfgyYa6DzRRcUso8M8
53 行
2.1 KiB
Plaintext
53 行
2.1 KiB
Plaintext
# PhoneRail 需求文档站(VitePress 静态产物)
|
|
# 部署到 /etc/nginx/conf.d/phonerail-docs.conf
|
|
#
|
|
# ⚠️ 只 listen 127.0.0.1 —— 正门是统一门户 http://phonerail.home.example:7755/,
|
|
# 门户的 vhost 反代到 127.0.0.1:7757,不需要这个端口对外可达。
|
|
# 这台机器实测是大范围/DMZ 转发,绑 0.0.0.0 = 公网直连即绕过登录
|
|
# (现有 12 个应用就是这个状态,见 skill §关键约定 7)。这里不重蹈。
|
|
# 代价:内网直连 10.5.5.13:7757 也进不来。要留内网兜底就再加一行
|
|
# `listen 10.5.5.13:7757;` —— 但那样公网同样可达,是个真实的取舍。
|
|
|
|
server {
|
|
listen 127.0.0.1:7757;
|
|
server_name _;
|
|
|
|
root /root/phonerail-docs;
|
|
index index.html;
|
|
charset utf-8;
|
|
|
|
# nginx.conf 里只有 gzip on 没有 gzip_types,默认只压 text/html,
|
|
# 不在这里补上的话 JS/CSS 全是裸传(见 skill §关键约定 6)
|
|
gzip_static on;
|
|
gzip_types text/plain text/css application/javascript application/json
|
|
application/xml image/svg+xml font/woff font/woff2;
|
|
gzip_min_length 1024;
|
|
gzip_vary on;
|
|
|
|
# VitePress 的 assets 文件名带内容哈希,可以永久缓存
|
|
location /assets/ {
|
|
expires 1y;
|
|
add_header Cache-Control "public, immutable";
|
|
access_log off;
|
|
}
|
|
|
|
# 入口页绝不能被缓存:缓存住之后页面不再走服务器,
|
|
# 门户的 auth_request 就永远不会触发(skill §关键约定 8 踩过两次的坑)
|
|
location = /index.html {
|
|
add_header Cache-Control "no-cache";
|
|
}
|
|
|
|
# cleanUrls: /foo -> foo.html;只有一篇正文时也保持这个行为。
|
|
# 结尾必须是 =404 而不是 /404.html —— try_files 的最后一个参数是内部跳转,
|
|
# 会把 404 页以 HTTP 200 吐出去(实测过)。交给下面的 error_page 才有真 404。
|
|
location / {
|
|
try_files $uri $uri.html $uri/ =404;
|
|
}
|
|
|
|
error_page 404 /404.html;
|
|
|
|
server_tokens off;
|
|
access_log /var/log/nginx/phonerail-docs.access.log;
|
|
error_log /var/log/nginx/phonerail-docs.error.log warn;
|
|
}
|