mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-03 06:12:14 +08:00
* feat: add `make start` command for local previewing * Update Makefile Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix: update help text for `make dev` and `make start` commands * feat: enhance Docker support with production setup and deployment script * feat: add production commands to Makefile * feat: remove PostgreSQL and Redis services from Docker Compose and update deploy script * fix: address Copilot review suggestions from Docker production PR #1086 (#10) * Initial plan * fix: address all review suggestions from PR #1086 Co-authored-by: foreleven <4785594+foreleven@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: foreleven <4785594+foreleven@users.noreply.github.com> * Update docker/docker-compose.yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * feat: remove deprecated Dockerfile.langgraph to clean up repository --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: foreleven <4785594+foreleven@users.noreply.github.com> Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
36 lines
1.6 KiB
Docker
36 lines
1.6 KiB
Docker
# Frontend Dockerfile
|
|
# Supports two targets:
|
|
# --target dev — install deps only, run `pnpm dev` at container start
|
|
# --target prod — full build baked in, run `pnpm start` at container start (default if no --target is specified)
|
|
|
|
ARG PNPM_STORE_PATH=/root/.local/share/pnpm/store
|
|
|
|
# ── Base: shared setup ────────────────────────────────────────────────────────
|
|
FROM node:22-alpine AS base
|
|
ARG PNPM_STORE_PATH
|
|
RUN corepack enable && corepack install -g pnpm@10.26.2
|
|
RUN pnpm config set store-dir ${PNPM_STORE_PATH}
|
|
WORKDIR /app
|
|
COPY frontend ./frontend
|
|
|
|
# ── Dev: install only, CMD is overridden by docker-compose ───────────────────
|
|
FROM base AS dev
|
|
RUN cd /app/frontend && pnpm install --frozen-lockfile
|
|
EXPOSE 3000
|
|
|
|
# ── Builder: install + compile Next.js ───────────────────────────────────────
|
|
FROM base AS builder
|
|
RUN cd /app/frontend && pnpm install --frozen-lockfile
|
|
# Skip env validation — runtime vars are injected by nginx/container
|
|
RUN cd /app/frontend && SKIP_ENV_VALIDATION=1 pnpm build
|
|
|
|
# ── Prod: minimal runtime with pre-built output ───────────────────────────────
|
|
FROM node:22-alpine AS prod
|
|
ARG PNPM_STORE_PATH
|
|
RUN corepack enable && corepack install -g pnpm@10.26.2
|
|
RUN pnpm config set store-dir ${PNPM_STORE_PATH}
|
|
WORKDIR /app
|
|
COPY --from=builder /app/frontend ./frontend
|
|
EXPOSE 3000
|
|
CMD ["sh", "-c", "cd /app/frontend && pnpm start"]
|