2022-01-10 12:47:55 -07:00
|
|
|
FROM node:16-alpine AS builder
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
# Install app dependencies
|
|
|
|
COPY package*.json ./
|
|
|
|
RUN npm ci
|
|
|
|
|
|
|
|
# Build the app
|
|
|
|
COPY . .
|
|
|
|
RUN npm run build
|
|
|
|
|
|
|
|
FROM nginx:1.20-alpine AS server
|
|
|
|
|
2022-01-10 13:21:42 -07:00
|
|
|
COPY --from=builder /app/dist /usr/share/nginx/html
|
2022-01-10 12:47:55 -07:00
|
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|