mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
8c26e30fba
Each starter gets a Dockerfile, entrypoint.sh, and .dockerignore. Docker-specific adaptations only — original code untouched: - HOSTNAME=0.0.0.0 for Next.js standalone - PORT override for Python agents (Railway sets PORT=3000) - uv sync --frozen for exact dep resolution from lockfiles - serve.py + docker-route-override.ts for LangGraph starters (langgraph-cli dev needs Docker-in-Docker, unavailable on Railway) - next.config.ts: ignoreBuildErrors for HttpAgent type mismatch - Mastra: workingMemory scope: thread for standalone deploy - CVE fix: patch package.json to next@15.3.8 at deploy time
38 lines
643 B
Docker
38 lines
643 B
Docker
# Build stage
|
|
FROM node:20-slim AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
# Enable corepack for pnpm support
|
|
RUN corepack enable
|
|
|
|
# Copy package files
|
|
COPY package.json ./
|
|
|
|
# Install dependencies (no lockfile in this starter)
|
|
RUN npm install
|
|
|
|
# Copy source code
|
|
COPY . .
|
|
|
|
# Build the Next.js application
|
|
RUN npm run build
|
|
|
|
# Production stage
|
|
FROM node:20-slim AS runner
|
|
|
|
WORKDIR /app
|
|
|
|
ENV NODE_ENV=production
|
|
ENV PORT=3000
|
|
ENV HOSTNAME=0.0.0.0
|
|
|
|
# Copy the standalone build output
|
|
COPY --from=builder /app/.next/standalone ./
|
|
COPY --from=builder /app/.next/static ./.next/static
|
|
COPY --from=builder /app/public ./public
|
|
|
|
EXPOSE 3000
|
|
|
|
CMD ["node", "server.js"]
|