14 lines
407 B
Docker
14 lines
407 B
Docker
# build
|
|
FROM node:22-slim AS build
|
|
WORKDIR /app
|
|
COPY package*.json ./
|
|
RUN npm ci --no-audit --no-fund
|
|
COPY . .
|
|
RUN npm run build
|
|
# serve
|
|
FROM nginx:alpine
|
|
COPY --from=build /app/dist /usr/share/nginx/html
|
|
RUN printf 'server{listen 80;root /usr/share/nginx/html;location / {try_files $uri $uri/ /index.html;}}' > /etc/nginx/conf.d/default.conf
|
|
EXPOSE 80
|
|
HEALTHCHECK CMD wget -qO- http://localhost/ || exit 1
|