2024-10-01 15:08:52 -04:00
|
|
|
# Build application
|
|
|
|
FROM node:alpine as build
|
|
|
|
|
|
|
|
RUN mkdir /app
|
|
|
|
WORKDIR /app
|
|
|
|
COPY . .
|
2024-10-01 15:39:24 -04:00
|
|
|
RUN if [ ! -d "node_modules" ]; then npm i; fi && \
|
|
|
|
if [ ! -d "dist" ]; then npm run docs; fi
|
2024-10-01 15:08:52 -04:00
|
|
|
|
|
|
|
# Use Nginx to serve
|
|
|
|
FROM nginx:1.23-alpine
|
|
|
|
|
|
|
|
COPY --from=build /app/docs /usr/share/nginx/html
|