This commit is contained in:
2026-09-04 11:38:24 +00:00
parent f4db22e828
commit bc5ced1843
13 changed files with 925 additions and 62 deletions
+3 -3
View File
@@ -5,7 +5,7 @@
# runner — lean runtime: production deps + dist + a plain Node server
# (no build tooling ships in the final image)
ARG NODE_VERSION=24
ARG NODE_VERSION=26
# ── deps ────────────────────────────────────────────────────
FROM node:${NODE_VERSION}-trixie-slim AS deps
@@ -24,7 +24,7 @@ RUN npm run build
# ── runner ──────────────────────────────────────────────────
FROM node:${NODE_VERSION}-trixie-slim AS runner
LABEL org.opencontainers.image.title="Mozimo" \
org.opencontainers.image.description="Mozimo — luxury chocolate storefront (TanStack Start + Vite)"
org.opencontainers.image.description="Mozimo — luxury chocolate storefront (TanStack Start + Vite)"
WORKDIR /app
ENV NODE_ENV=production \
@@ -47,7 +47,7 @@ USER node
EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
CMD node -e "fetch('http://127.0.0.1:'+(process.env.PORT||3000)+'/',{redirect:'manual'}).then(r=>process.exit(r.status<500?0:1)).catch(()=>process.exit(1))"
CMD node -e "fetch('http://127.0.0.1:'+(process.env.PORT||3000)+'/',{redirect:'manual'}).then(r=>process.exit(r.status<500?0:1)).catch(()=>process.exit(1))"
# Exec form: node runs as PID 1 and server.mjs handles SIGTERM gracefully.
CMD ["node", "server.mjs"]