27 lines
743 B
Docker
27 lines
743 B
Docker
FROM node:20-slim
|
|
|
|
# Install pnpm
|
|
RUN npm install -g pnpm@10
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy package files and install dependencies
|
|
COPY package.json pnpm-lock.yaml ./
|
|
RUN pnpm install --frozen-lockfile
|
|
|
|
# Copy source code
|
|
COPY . .
|
|
|
|
# langgraphjs dev requires .env to exist, and writes .langgraph_api + .gitignore on startup
|
|
# Pre-create these to prevent tsx file watcher from triggering a restart loop
|
|
RUN touch .env && \
|
|
mkdir -p .langgraph_api && \
|
|
echo ".langgraph_api" >> .gitignore
|
|
|
|
# Expose LangGraph server port
|
|
EXPOSE 2024
|
|
|
|
# Use langgraphjs dev with explicit host binding
|
|
# The --host flag ensures it binds to 0.0.0.0 not just localhost
|
|
CMD ["pnpm", "exec", "langgraphjs", "dev", "--host", "0.0.0.0", "--port", "2024", "--no-browser"]
|