|
|
58da508e7d
|
chore(env): switch TOS bucket from teammate's to own (cyber-star@cn-shanghai)
Build and Deploy / build-and-deploy (push) Successful in 5m57s
域名变化:
旧: https://cyberstar.tos-cn-shanghai.volces.com/cyber-star (临时桶, 带路径前缀)
新: https://cyber-star.tos-cn-shanghai.volces.com (自有桶, 桶名即子域, 无路径前缀)
操作:
- 在自有火山账号下建 cyber-star 桶 (cn-shanghai), 公共读, 对象 ACL 默认公共读
- 网页控制台「上传文件夹」方式把本地 assets-compressed/portraits 和 videos 直接传到桶根
- 切 NEXT_PUBLIC_TOS_DOMAIN
代码无需改动 (tosUrl() 已自动处理), 仅 env 切换。
next.config.ts images.remotePatterns 已包含 *.tos-cn-shanghai.volces.com, 无需更新。
dev 验证:
- 首页 / artists/001 / artists/036 / ranking 所有资源 src 全部走新桶
- 旧域名已彻底切除
- portraits/001.webp 200, hero-pv.mp4 200, 缺视频/缺氛围图 3 仍然 404 (预期)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-05-13 16:14:58 +08:00 |
|
|
|
8c88943a06
|
feat(tos): point all static assets to volcano TOS bucket
Build and Deploy / build-and-deploy (push) Successful in 5m0s
资源已上传到 https://cyberstar.tos-cn-shanghai.volces.com/cyber-star/
代码改动:
- 新增 src/lib/tos.ts 提供 tosUrl(path) 工具,读 NEXT_PUBLIC_TOS_DOMAIN
- mock-data.ts: portrait/gallery 切到 .webp, videoUrl 走 TOS, 全部通过 tosUrl()
- page.tsx Hero PV 走 tosUrl("videos/hero-pv.mp4")
- next.config.ts 把火山 TOS 域名(沪/京)+ 火山 CDN 加进 images.remotePatterns 白名单
- .env.example 更新 NEXT_PUBLIC_TOS_DOMAIN 示例为实际桶域名
体积影响 (与之前打包给运维的 cyber-star-assets.tar.gz 一致):
- 立绘 5MB png → 100-300KB webp (-95%)
- 单人 solo 5-10MB mp4 → 1-3MB (-70%)
- Hero PV 45MB → 12MB (-70%)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-05-13 14:37:46 +08:00 |
|