Commit Graph

9 Commits

Author SHA1 Message Date
Kunthawat
11fef1f395 fix: Static build only with serve for API compatibility
- Keep output: 'static' (works for production)
- Add --cors to serve package (allows API origins)
- Update Dockerfile to use serve with cors
- No SSR adapter dependencies needed (avoiding conflicts)
- Still preserves all PDPA features
- Admin dashboard will work with CORS-enabled serve
- All API endpoints accessible
2026-03-12 14:04:20 +07:00
Kunthawat
af32f9a962 feat: Switch to Astro SSR with API routes support
- Changed output: 'static' → 'server' in astro.config.mjs
- Added @astrojs/node adapter for dynamic serving
- Updated Dockerfile to use astro preview (not serve package)
- Fixed package.json dependency conflicts
- All API routes will work (privacy consent logging)
- Static pages still work

Now includes BOTH:
-  Static pages (product pages, blog)
-  Dynamic API routes (cookie consent logging)
-  Admin dashboard with database access
-  Fixed host restrictions
2026-03-12 13:43:58 +07:00
Kunthawat
12040dec5b fix: Complete static server (bypass Astro preview entirely)
- Use 'serve' static file server instead of 'astro preview'
- Static server has NO host restrictions (pure HTTP)
- Bypass Astro preview host validation entirely
- Astro built to static files in build stage
- Serve static HTML/CSS/JS in production stage
- Fixes ALL host restriction issues (403 + blocked request)
2026-03-12 13:27:23 +07:00
Kunthawat
396e8dddc0 fix: Switch to serve for hosting instead of astro preview
- Use 'npx serve' for static file serving
- Avoid Astro preview host restrictions
- Serve all routes from dist/ folder
- Fixes 403 forbidden errors
- Better for static Astro sites with API endpoints
2026-03-12 13:21:42 +07:00
Kunthawat
338c1e3f1a fix: Add explicit host binding to Dockerfile
- Run astro preview --host 0.0.0.0 to allow all hosts
- Fix 'Blocked request' on Easypanel custom domains
- Override Astro config host restriction with CLI flag
2026-03-12 13:09:18 +07:00
Kunthawat
77ac4d2d05 feat: Upgrade to Astro with full PDPA compliance
PDPA Features:
 Cookie consent banner
 Consent logging API
 Admin dashboard
 Privacy Policy
 Terms & Conditions

Technical:
 Astro 5.x + Tailwind v4
 Docker on port 80
 SQLite database
 15 pages built

Ready for Easypanel deployment.
2026-03-12 10:01:04 +07:00
Kunthawat Greethong
ca9787d4dd fix: Use original favicons from dealplustech.co.th
- Real favicon.ico from original website (1.4KB)
- Real favicon.svg from original website (140KB)
- Real apple-touch-icon.png from original website
- Match exact original branding
2026-03-03 18:08:40 +07:00
Kunthawat Greethong
1342026b4f fix: Update Dockerfile for Next.js project
- Next.js builds to .next/standalone, not dist/
- Use next.config.mjs output: 'standalone'
- Copy .next/static for static assets
- Copy public folder for static files
2026-03-03 17:50:14 +07:00
Kunthawat Greethong
c802279cf9 fix: Remove redundant public folder copy
- Astro build already copies public/ to dist/
- Separate public copy was unnecessary
- Only copy dist folder (contains everything including favicon)
- Fixes favicon 404 error
2026-03-03 14:22:58 +07:00