26 lines
578 B
Docker
26 lines
578 B
Docker
# syntax=docker/dockerfile:1.7
|
|
|
|
FROM node:24-alpine AS deps
|
|
WORKDIR /app
|
|
|
|
COPY package*.json ./
|
|
RUN --mount=type=cache,target=/root/.npm npm ci
|
|
|
|
FROM node:24-alpine AS build
|
|
WORKDIR /app
|
|
|
|
COPY --from=deps /app/node_modules ./node_modules
|
|
COPY package*.json ./
|
|
COPY . .
|
|
RUN npm run build
|
|
|
|
FROM nginx:1.27-alpine AS production
|
|
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
COPY --from=build /app/dist/client/browser /usr/share/nginx/html
|
|
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
|
CMD wget -qO- http://127.0.0.1/ >/dev/null || exit 1
|
|
|
|
EXPOSE 80
|