Serve with Node/Express instead of nginx (matches working astroreal pattern)

- Add server.js: Express serves dist/ + injects env (GA_ID, FORM_EMAIL, GMAP) at runtime
- Container port now 4321 (identical to moreminimore-astroreal that deploys on EasyPanel)
- Remove nginx.conf + entrypoint.sh (no longer needed); Dockerfile uses node server.js
- Verified: pnpm build + node server.js -> all 40 pages serve 200, env injected, 0 leftovers
This commit is contained in:
2026-08-06 15:13:39 +07:00
parent a8fa17a947
commit 44c405730e
9 changed files with 713 additions and 182 deletions

View File

@@ -1,23 +1,21 @@
# ============================================================
# มิตซูชัยพร static site — environment variables
# Copy to `.env` (or set in EasyPanel service env) and adjust.
# These get injected into the HTML at container startup by entrypoint.sh.
# มิตซูชัยพร — environment variables
# Set in EasyPanel (Service → Environment) or --env at docker run.
# Injected by server.js when serving HTML.
# ============================================================
# Port Express listens on (EasyPanel container port must MATCH this)
PORT=4321
# --- Google Analytics / GTM ---
# Measurement ID (e.g. G-XXXXXXXXXX). Leave EMPTY to disable analytics.
# GA_ID=G-L4835B8PSW
# Leave EMPTY to disable analytics.
GA_ID=
# --- Contact / RFQ form email (FormSubmit) ---
# Email that receives form submissions.
FORM_EMAIL=mail@mitsuchaiyaporn.com
# --- Google Map (type A — free embed, NO API key required) ---
# Option 1: provide lat/lng (recommended)
# --- Google Map (type A — free embed, no API key) ---
GMAP_LAT=13.557229094780995
GMAP_LNG=100.28916297408983
GMAP_ZOOM=16
# Option 2: full embed URL (overrides lat/lng)
# GMAP_EMBED=https://maps.google.com/maps?q=13.557229094780995,100.28916297408983&z=16&output=embed
# GMAP_EMBED=https://maps.google.com/maps?q=13.55,100.28&z=16&output=embed