mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
c089d5969e
# Conflicts: # .github/workflows/showcase_deploy.yml # showcase/integrations/built-in-agent/.env.example # showcase/integrations/built-in-agent/Dockerfile # showcase/integrations/built-in-agent/README.md # showcase/integrations/built-in-agent/docs-links.json # showcase/integrations/built-in-agent/entrypoint.sh # showcase/integrations/built-in-agent/next.config.ts # showcase/integrations/built-in-agent/package-lock.json # showcase/integrations/built-in-agent/package.json # showcase/integrations/built-in-agent/playwright.config.ts # showcase/integrations/built-in-agent/postcss.config.mjs # showcase/integrations/built-in-agent/public/.gitkeep # showcase/integrations/built-in-agent/qa/agentic-chat.md # showcase/integrations/built-in-agent/qa/gen-ui-agent.md # showcase/integrations/built-in-agent/qa/gen-ui-tool-based.md # showcase/integrations/built-in-agent/qa/hitl-in-chat.md # showcase/integrations/built-in-agent/qa/sales-dashboard.md # showcase/integrations/built-in-agent/qa/shared-state-read-write.md # showcase/integrations/built-in-agent/qa/shared-state-streaming.md # showcase/integrations/built-in-agent/qa/subagents.md # showcase/integrations/built-in-agent/qa/tool-rendering.md # showcase/integrations/built-in-agent/src/app/api/copilotkit/[[...slug]]/route.ts # showcase/integrations/built-in-agent/src/app/api/health/route.ts # showcase/integrations/built-in-agent/src/app/copilotkit-overrides.css # showcase/integrations/built-in-agent/src/app/demos/agentic-chat/page.tsx # showcase/integrations/built-in-agent/src/app/demos/gen-ui-agent/page.tsx # showcase/integrations/built-in-agent/src/app/demos/gen-ui-tool-based/page.tsx # showcase/integrations/built-in-agent/src/app/demos/hitl/page.tsx # showcase/integrations/built-in-agent/src/app/demos/shared-state-read-write/page.tsx # showcase/integrations/built-in-agent/src/app/demos/shared-state-streaming/page.tsx # showcase/integrations/built-in-agent/src/app/demos/subagents/page.tsx # showcase/integrations/built-in-agent/src/app/demos/tool-rendering/page.tsx # showcase/integrations/built-in-agent/src/app/globals.css # showcase/integrations/built-in-agent/src/app/layout.tsx # showcase/integrations/built-in-agent/src/app/page.tsx # showcase/integrations/built-in-agent/src/lib/factory/server-tools.ts # showcase/integrations/built-in-agent/src/lib/factory/state-tools.ts # showcase/integrations/built-in-agent/src/lib/factory/subagent-tools.ts # showcase/integrations/built-in-agent/src/lib/factory/tanstack-factory.ts # showcase/integrations/built-in-agent/tests/e2e/agentic-chat.spec.ts # showcase/integrations/built-in-agent/tests/e2e/gen-ui-agent.spec.ts # showcase/integrations/built-in-agent/tests/e2e/gen-ui-tool-based.spec.ts # showcase/integrations/built-in-agent/tests/e2e/hitl-in-chat.spec.ts # showcase/integrations/built-in-agent/tests/e2e/shared-state-read.spec.ts # showcase/integrations/built-in-agent/tests/e2e/shared-state-streaming.spec.ts # showcase/integrations/built-in-agent/tests/e2e/shared-state-write.spec.ts # showcase/integrations/built-in-agent/tests/e2e/subagents.spec.ts # showcase/integrations/built-in-agent/tests/e2e/tool-rendering.spec.ts # showcase/integrations/built-in-agent/tsconfig.json
44 lines
1.4 KiB
Docker
44 lines
1.4 KiB
Docker
# Single-stage Dockerfile for the built-in-agent showcase package.
|
|
# Unlike sibling showcase packages (which run a separate agent server
|
|
# process and need a multi-stage build), built-in-agent runs its
|
|
# BuiltInAgent in-process inside the Next.js route handler. One Node
|
|
# image, one process, one port.
|
|
|
|
# Stage 1: Build Next.js
|
|
FROM node:22-slim AS builder
|
|
WORKDIR /app
|
|
COPY package.json package-lock.json ./
|
|
RUN npm ci --legacy-peer-deps
|
|
COPY . .
|
|
RUN npx next build
|
|
|
|
# Stage 2: Runtime
|
|
FROM node:22-slim AS runner
|
|
WORKDIR /app
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends curl \
|
|
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN (groupadd --system --gid 1001 app 2>/dev/null || true) \
|
|
&& (useradd --system --uid 1001 --gid 1001 --no-create-home app 2>/dev/null || true) \
|
|
&& mkdir -p /home/app && chown app:app /home/app
|
|
|
|
COPY --chown=app:app --from=builder /app/.next ./.next
|
|
COPY --chown=app:app --from=builder /app/node_modules ./node_modules
|
|
COPY --chown=app:app --from=builder /app/package.json ./
|
|
COPY --chown=app:app --from=builder /app/public ./public
|
|
|
|
COPY --chown=app:app entrypoint.sh ./
|
|
RUN chmod +x entrypoint.sh
|
|
|
|
# Ensure WORKDIR itself is owned by `app` — `WORKDIR /app` at the top of
|
|
# the stage creates /app as root. Without this, any CLI that tries to
|
|
# mkdir under /app at runtime hits EACCES.
|
|
RUN chown app:app /app
|
|
USER app
|
|
|
|
EXPOSE 10000
|
|
ENV PORT=10000
|
|
ENV HOSTNAME=0.0.0.0
|
|
CMD ["./entrypoint.sh"]
|