mirror of
https://github.com/ckaczor/HomeMonitor.git
synced 2026-01-13 17:22:54 -05:00
26 lines
482 B
Docker
26 lines
482 B
Docker
### STAGE 1: Build ###
|
|
|
|
FROM node:18.7-alpine as builder
|
|
|
|
COPY package.json package-lock.json ./
|
|
|
|
RUN npm ci && mkdir /ng-app && mv ./node_modules ./ng-app
|
|
|
|
WORKDIR /ng-app
|
|
|
|
COPY . .
|
|
|
|
RUN npm run ng build -- --configuration production --aot --output-path=dist
|
|
|
|
### STAGE 2: Setup ###
|
|
|
|
FROM nginx:1.23.0-alpine
|
|
|
|
COPY nginx/default.conf /etc/nginx/conf.d/
|
|
|
|
RUN rm -rf /usr/share/nginx/html/*
|
|
|
|
COPY --from=builder /ng-app/dist /usr/share/nginx/html
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|