Pin CI, Docker, and engines to the current Active LTS and bump @types/node. Co-authored-by: Cursor <cursoragent@cursor.com>
38 lines
833 B
Docker
38 lines
833 B
Docker
FROM docker.io/library/node:24.16.0-alpine3.22 AS mermaid-live-editor-dependencies
|
|
|
|
RUN apk --no-cache add build-base git python3 && \
|
|
rm -rf /var/cache/apk/*
|
|
|
|
RUN corepack enable pnpm
|
|
|
|
WORKDIR /app
|
|
|
|
COPY ./package.json .
|
|
COPY ./pnpm-lock.yaml .
|
|
|
|
RUN pnpm install
|
|
|
|
FROM mermaid-live-editor-dependencies AS mermaid-live-editor-builder
|
|
|
|
ARG MERMAID_RENDERER_URL
|
|
ARG MERMAID_KROKI_RENDERER_URL
|
|
ARG MERMAID_ANALYTICS_URL
|
|
ARG MERMAID_DOMAIN
|
|
ARG MERMAID_IS_ENABLED_MERMAID_CHART_LINKS
|
|
ARG MERMAID_PRIVACY_POLICY_URL
|
|
ARG MERMAID_HIDE_PRIVACY_POLICY
|
|
ARG MERMAID_BASE_PATH
|
|
|
|
COPY . ./
|
|
|
|
RUN pnpm build
|
|
|
|
FROM mermaid-live-editor-builder AS mermaid-dev
|
|
|
|
ENTRYPOINT ["pnpm", "dev"]
|
|
|
|
FROM nginx:1.28-alpine3.21 AS mermaid
|
|
|
|
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
|
|
COPY --from=mermaid-live-editor-builder /app/docs /usr/share/nginx/html
|