Commit Graph
7 Commits
Author SHA1 Message Date
zhangxiang d4caa7bef3 fix(deploy): 修复生产 CMS 解密失败与媒体库 500
- deploy.sh 构建时从 .env.production 显式注入 NEXT_PUBLIC_ENCRYPTION_SECRET,
  避免 .env.local 开发密钥覆盖生产密钥,导致前端 chunk 与后端 ENCRYPTION_SECRET
  不匹配,CMS 所有列表/仪表盘解密失败(The operation failed for an
  operation-specific reason)
- Dockerfile.prod 新增 sharp-deps 阶段,为 Alpine 容器补充 @img/sharp-linuxmusl-x64
  平台依赖,修复媒体库接口缺失 musl 二进制导致的 500
2026-08-20 12:06:34 +08:00
zhangxiang f14b82ab63 fix(deploy): wait for Next.js container readiness before verification
The container can still be booting when Nginx starts proxying, causing a
temporary 502 in the post-deploy verification. Poll localhost:3000 for up
to 60s after recreating the container.
2026-08-18 13:11:11 +08:00
zhangxiang f815f87e3d fix(deploy): brace COMPOSE_FILE in Chinese echo string
Bash treated the full-width comma after $COMPOSE_FILE as part of the
variable name under UTF-8 locale, causing an unbound variable error at
the Next.js container rebuild step.
2026-08-18 13:09:23 +08:00
zhangxiang c06309b2f2 feat(deploy): rebuild Next.js container after dist upload
Hybrid rendering requires the Next.js runtime to use the same build as
the client assets served by Nginx. After uploading dist, sync public/
to the server project and rebuild/restart the novalon-website container
so server action IDs and /_next/static references stay consistent.
2026-08-18 13:06:52 +08:00
zhangxiang 57e00aa4b4 fix(deploy): serve standalone client chunks at /_next/static
Next.js standalone output places client chunks under dist/static, but the
generated HTML references /_next/static/... which Nginx serves from
dist/_next/static. Mirror static -> _next/static during build so CSS/JS
load with correct MIME types instead of 404.
2026-08-18 13:03:58 +08:00
zhangxiang 6fa5e4bf32 fix(deploy): sync public assets into standalone dist root
Next.js standalone output does not place public/ files at the dist root,
so rsync --delete was removing logo/favicon/fonts/images from production.
Copy public/ into dist after build so Nginx can serve them.
2026-08-18 12:56:19 +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