Commit Graph
3 Commits
Author SHA1 Message Date
Bkk1234 b1322b971e fix(deploy): CSS hash เก่าไม่ 404 + เงียบ /_agent-native 404 + sw v2.1.5
จาก audit log จริงบน Dokploy เจอ 2 เคส
1) GET /assets/global-DjioL_Jq.css → 404 (หน้าที่ยังค้างแคช/SW รุ่นก่อนอ้าง CSS hash เก่า)
   → nginx: ^/assets/*.css ใช้ try_files $uri /assets/global.css
   → 30-origin.sh คัดลอก assets/global-<hash>.css → assets/global.css ตอนสตาร์ท (ไม่ต้อง hardcode hash)
2) GET /_agent-native/auth/session|agent-engine/status, POST /_agent-native/auth/attribution, /__agent-native-chunk-recovery → 404 31KB
   → nginx: return 204 + access_log off (client chunk ยังยิงอยู่ แต่ไม่กิน log/แบนด์วิดท์)
3) sw.js VERSION v2.1.5 (ล้างแคชหน้าเก่าให้ผู้ใช้)
2026-11-25 03:26:41 +07:00
Bkk1234 82374ebfdd fix(scroll): mouse wheel did not scroll the page
main.agent-native-app-main is a scroll container (overflow-y:auto +
overscroll-contain) whose content equals its own height, so it swallowed the
wheel and the document never scrolled; the site wrapper's overflow-x:hidden
also made its overflow-y compute to auto. Neutralise both scrollers so the
document is the only scroller (overflow-x:clip keeps horizontal clipping).

Cache safety: the patched CSS kept its old hashed filename, and nginx served
/assets/* as immutable for a year, so visitors with the earlier CSS could
never receive the fix. Renamed the stylesheet to a content hash and updated
34 HTML references, switched /assets/ to no-cache (revalidate, 304), bumped
sw.js VERSION to v2.1.2. docs/deploy-dokploy.md updated.
2026-11-22 22:52:17 +07:00
Bkk1234 ae34597847 feat(docker): nginx static-export image + Dokploy compose with env-driven PORT/origin
- Dockerfile: nginx:1.27-alpine serving the exported site, PORT from env,
  /healthz healthcheck, origin rewrite hook in docker-entrypoint.d
- docker/default.conf.template: envsubst PORT, clean URLs without trailing-slash
  redirect, long cache for hashed assets, no-cache for HTML/sw.js/manifest,
  301 http->https via X-Forwarded-Proto, gzip
- docker/security-headers.conf: single include so add_header survives per location
- docker-compose.yml (Dokploy, no host ports) + docker-compose.override.yml (local)
- bake canonical/OG/sitemap/robots origin to https://alterflixhub.hobbypj.com
  (was the export-time 127.0.0.1:8090), overridable via PUBLIC_ORIGIN
- docs/deploy-dokploy.md
2026-11-22 22:48:12 +07:00