- Add /api/conversions endpoint (Meta CAPI + GA4 Measurement Protocol) - SHA-256 PII hashing, event_id deduplication, fbp/fbc cookies - Client-side sendConversion() utility in PageShell.astro - Lead event tracking on form submit in home.js - GA4 allow_enhanced_conversions config
34 lines
1.5 KiB
Docker
34 lines
1.5 KiB
Docker
# ── MoreminiMore — Astro + Express + SES ─────────────────────────
|
|
# Build: npm run build → Runtime: node server.js (port 4321)
|
|
#
|
|
# Env vars:
|
|
# SES_ACCESS_KEY_ID (optional — SES email sending)
|
|
# SES_SECRET_ACCESS_KEY (optional)
|
|
# SES_REGION (default: ap-southeast-1)
|
|
# PORT (default: 4321)
|
|
# META_PIXEL_ID (default: 418349260078648)
|
|
# META_ACCESS_TOKEN (required for Meta CAPI)
|
|
# GA4_MEASUREMENT_ID (default: G-74BHREDLC3)
|
|
# GA4_API_SECRET (required for Google Enhanced Conversions)
|
|
|
|
FROM node:22-bookworm-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# ── Dependencies ──────────────────────────────────────────────────
|
|
COPY package.json package-lock.json ./
|
|
RUN npm ci
|
|
|
|
# ── Source + Build ───────────────────────────────────────────────
|
|
COPY . .
|
|
RUN npm run build
|
|
|
|
# ── Prune build-only deps (astro is ~200MB) ──────────────────────
|
|
# Keep: express, cors, nodemailer, @aws-sdk/client-ses
|
|
RUN npm prune --omit=dev 2>/dev/null; \
|
|
npm ls --depth=0 2>/dev/null || true
|
|
|
|
# ── Runtime ──────────────────────────────────────────────────────
|
|
EXPOSE 4321
|
|
CMD ["node", "server.js"]
|