13 lines
403 B
Docker
13 lines
403 B
Docker
FROM node:18-alpine AS build
|
|
WORKDIR /app
|
|
COPY package.json package-lock.json ./
|
|
RUN npm ci
|
|
COPY . ./
|
|
RUN npm run build
|
|
|
|
FROM nginx:alpine
|
|
ENV NGINX_ENVSUBST_OUTPUT_DIR=/usr/share/nginx/html
|
|
COPY --from=build /app/dist /usr/share/nginx/html
|
|
RUN mkdir etc/nginx/templates && \
|
|
mv /usr/share/nginx/html/index.html /etc/nginx/templates/index.html.template
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf |