fix(dockerfile): pre-create .langgraph_api to prevent tsx watch restart loop

This commit is contained in:
gongzhiyong
2026-04-10 05:23:07 +08:00
parent 3d35ca43be
commit 4a485a9c5b
+5 -3
View File
@@ -12,9 +12,11 @@ RUN pnpm install --frozen-lockfile
# Copy source code
COPY . .
# langgraphjs dev requires a .env file to exist (even if empty)
# Real env vars are injected by Azure Container App at runtime
RUN touch .env
# 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