文档:记录两个部署目标的服务方式,并开启线上压缩

排查「树莓派预览打不开」时发现两件事,都不是这次部署造成的,但都修了/记了:

1) 树莓派上根本没有 web 服务
   - nginx 未安装(Unit nginx.service could not be found),80 端口无人监听
   - deploy.sh 一直把文件 rsync 到 /home/pi/www/Astro_firefly(这次也确实到了,
     index.html 17:54、59 个 KaTeX 字体都在),但没有服务对外提供
   - 补了 Caddy 容器 blog-caddy(--restart unless-stopped,配置 /home/pi/caddy/Caddyfile,
     站点根挂到 /srv:ro),http://192.168.1.87 现在正常,各页面 200

2) 云服务器的 Caddy 一条 encode 都没有,全站裸传
   - twikoo.min.js 506 KB、主 CSS 231 KB、首页 HTML 134 KB
   - 站点块加 encode zstd gzip(改前按已有习惯备份成
     Caddyfile.bak.gzip.20260915_175943,validate 通过后 reload)
   - 实测 twikoo.min.js 506108 -> 160547 B(省 68%),CSS 230615 -> 40822 B(省 82%)
   - Caddy 按 Accept-Encoding 协商 zstd / gzip,所有页面仍 200

README 与操作指南补了「两个目标各自怎么服务的」和 Pi Caddy 的重建命令,
并注明 1Panel 管的 Caddyfile 手改后要注意什么、reload 为什么是安全的。
This commit is contained in:
dsh
2026-09-15 18:00:33 +08:00
parent d0e504d1c3
commit 71026ee291
3 changed files with 35 additions and 1 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
{
"updatedAt": "2026-09-15T09:51:31.421Z",
"updatedAt": "2026-09-15T10:00:22.188Z",
"source": "weread",
"books": [
{