Commit Graph
5 Commits
Author SHA1 Message Date
Bkk1234 ddfb0a5053 refactor(media): แยกรูปออกจาก code — รูปทั้งหมดอยู่บน object storage
code อยู่ใน git · รูปอยู่บน SeaweedFS (https://storage.hobbypj.com/hobbypj/alterflixhub/)

- อัปโหลด images/ (21 ไฟล์) + og/ (1 ไฟล์) ขึ้น storage แล้วตรวจ sha256 ตรงทุกไฟล์
- แทนที่อ้างอิง 894 จุด ใน 37 ไฟล์: /images/… → <storage>/images/…, /og/… → <storage>/og/…
  (absolute URL ทุกที่ รวม JSON-LD/og:image/twitter:image และ placeholder ในหลังบ้าน)
- ลบ images/ + og/ ออกจาก repo · สำเนาในเครื่องย้ายไป media/ (gitignored)
- scripts/media-to-storage.py: สคริปต์ที่ใช้ย้าย (บันทึกวิธี + ใช้ซ้ำได้เมื่อเปลี่ยน base)
- scripts/media-sync.py: --check / --upload รูปขึ้น storage (basic auth หรือ SSH tunnel ไป filer)
- sw.js: bump v2.1.6 + แคชรูปจาก storage แบบ cache-first (isMedia/mediaCacheFirst) กันออฟไลน์แล้วรูปหาย
- docker/traefik-storage-alterflixhub.yml: router เปิดอ่านสาธารณะเฉพาะ /hobbypj/alterflixhub/
  (host storage บังคับ Basic auth ทั้ง host — ต้องมี router priority 300 + CORS ก่อน)
- docs/media-storage.md: วิธีอัปโหลด/เพิ่มรูป + ข้อกำหนดฝั่ง Traefik
- .gitignore/.dockerignore: กัน media/, images/, og/ กลับเข้า repo/image

ไอคอน PWA (icon-*.png, favicon.svg) ยังอยู่ใน repo — ต้อง same-origin ให้ติดตั้ง PWA ได้
2026-11-27 02:08:19 +07:00
Bkk1234 8dca22622a docs(traefik): add dynamic file-provider config for alterflixhub.hobbypj.com
Adds docker/traefik-dynamic.example.yml (web -> 301 https, websecure with
letsencrypt resolver, loadBalancer to container:30004 with /healthz check)
and a deploy-dokploy.md section covering the Dokploy Traefik File System
steps, the DNS/dokploy-network prerequisites, and post-save verification.
2026-11-22 22:59:04 +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
Bkk1234 e6c4ebff48 chore(publish): replace source tree with static export at repo root
Publish the prerendered static export (index.html, 404.html, cinema/,
c/, about/, for-cinemas/, for-film-lovers/, assets/, images/, og/,
sitemap.xml, robots.txt) as the site root and remove the React Router
+ Nitro source tree from this branch. Source remains available in
history at 0548772.

Note: public/sw.js here reports VERSION v2.0.5 while the removed source
tree (v2.1.0) was newer, and .gitignore was not carried over.
2026-11-22 22:24:36 +07:00
Bkk1234 ba51bdfb02 feat(docker): Dockerfile + docker-compose (พอร์ตมาจาก env PORT/HOST_PORT)
- Dockerfile 3 stage: deps (pnpm + build tools สำหรับ node-pty) → build (agent-native build) → runtime (node:22-bookworm-slim, user node, HEALTHCHECK ตาม PORT)
- docker-compose.yml: PORT = พอร์ตในคอนเทนเนอร์, HOST_PORT = พอร์ตที่แมปออก host (8080 บนเครื่องนี้ถูกยึด จึงตั้งต้นที่ 8095), TZ, mount ./data เก็บ content/uploads/analytics/pglite
- .dockerignore ตัด node_modules/.output/data/.env ออกจาก build context
- README: section "รันด้วย Docker" + ตาราง env; .env.example: PORT/HOST_PORT
2026-11-21 20:59:44 +07:00