mnemo_cards/mnemo_cards_admin/web/Dockerfile

26 lines
613 B
Docker
Raw Normal View History

2025-12-11 00:38:08 +00:00
# syntax=docker/dockerfile:1.7
# --- Build stage ------------------------------------------------------------
FROM node:20-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
# --- Runtime stage ----------------------------------------------------------
FROM nginx:1.27-alpine AS runtime
WORKDIR /usr/share/nginx/html
# Replace default config with SPA-aware config
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/dist/ ./
EXPOSE 80
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
CMD wget -qO- http://127.0.0.1/ >/dev/null 2>&1 || exit 1