- Remove 4 stray '&' files (crawl artifact) that duplicated footer/about-us/contactus/root - Replace hardcoded GA id, form email, map src with placeholders (GA_ID, FORM_EMAIL, GMAP_EMBED) - Add entrypoint.sh: envsubst injects env vars into HTML at container startup - Add .env.example + .dockerignore/.gitignore guarding .env secrets - Google Map type A (free embed, no API key) configurable via GMAP_LAT/LNG - Verify: all 39 pages, images (38/home), content blocks (296) match original; 0 missing assets Full clone comparison against www.mitsuthailand.com confirms sections complete.
32 lines
1.2 KiB
Docker
32 lines
1.2 KiB
Docker
# Static mirror of www.mitsuthailand.com (บริษัท มิตซูชัยพร จำกัด ศูนย์มิตซูบิชิ สมุทรสาคร)
|
|
# Serves the mirrored static site with nginx. All URLs are relative (domain-agnostic).
|
|
# Env vars (GA_ID, FORM_EMAIL, GMAP_LAT/LNG) are injected into HTML at startup.
|
|
# Host on EasyPanel: create a Dockerfile service, port 80.
|
|
|
|
FROM nginx:1.27-alpine
|
|
|
|
# Remove default site content
|
|
RUN rm -rf /usr/share/nginx/html/*
|
|
|
|
# Copy the mirrored static site
|
|
COPY site/ /usr/share/nginx/html/
|
|
|
|
# Custom nginx config: clean URLs via directory/index.html + caching
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
|
|
# Entrypoint injects env vars (GA, form email, google map) into HTML before serving.
|
|
COPY entrypoint.sh /entrypoint.sh
|
|
RUN chmod +x /entrypoint.sh
|
|
|
|
# Ship example env as defaults (real secrets should be provided via EasyPanel env,
|
|
# overriding these at runtime — see .env.example for keys).
|
|
COPY .env.example /etc/mitsu/.env.example
|
|
|
|
EXPOSE 80
|
|
|
|
HEALTHCHECK --interval=30s --timeout=3s --retries=3 \
|
|
CMD wget -q -O /dev/null http://localhost/ || exit 1
|
|
|
|
# Run the entrypoint (injects env) then nginx in foreground
|
|
ENTRYPOINT ["/entrypoint.sh"]
|