Files
deerflow-code/deploy/linux-docker-offline/Dockerfile.frontend
T

25 lines
677 B
Docker

FROM node:22-bookworm-slim AS builder
WORKDIR /workspace/frontend-web
RUN corepack enable && corepack prepare pnpm@10.26.2 --activate
COPY frontend-web/package.json frontend-web/pnpm-lock.yaml ./
RUN --mount=type=cache,target=/root/.local/share/pnpm/store \
pnpm install --frozen-lockfile
COPY frontend-web/ ./
ENV VITE_ASSET_BASE=/
RUN pnpm build
FROM nginx:1.28-alpine
COPY deploy/linux-docker-offline/nginx/deerflow.conf /etc/nginx/conf.d/default.conf
COPY --from=builder /workspace/frontend-web/dist /usr/share/nginx/html
EXPOSE 80
HEALTHCHECK --interval=20s --timeout=5s --start-period=10s --retries=5 \
CMD wget -q -O /dev/null http://127.0.0.1/ || exit 1