mirror of
https://gitlab.com/megazordpobeda/DataRush.git
synced 2026-05-22 20:57:09 +00:00
29 lines
435 B
Docker
29 lines
435 B
Docker
# Stage 1: Base image
|
|
FROM node:lts-alpine AS base
|
|
|
|
ENV FORCE_COLOR=0
|
|
|
|
RUN corepack enable
|
|
|
|
WORKDIR /opt/docusaurus
|
|
|
|
# Stage 2: Production build mode
|
|
FROM base AS prod
|
|
|
|
WORKDIR /opt/docusaurus
|
|
|
|
COPY . /opt/docusaurus/
|
|
|
|
RUN npm ci --omit=dev
|
|
|
|
RUN npm run build
|
|
|
|
# Stage 3: Serve with nginx
|
|
FROM nginx:stable-alpine AS serve
|
|
|
|
COPY --from=builder /opt/docusaurus/build /usr/share/nginx/html
|
|
|
|
EXPOSE 80
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|