feat: unified serve.sh with gateway mode support (#1847)

This commit is contained in:
greatmengqi
2026-04-05 21:07:35 +08:00
committed by GitHub
parent 117fa9b05d
commit ca2fb95ee6
11 changed files with 551 additions and 376 deletions
+10 -7
View File
@@ -19,8 +19,6 @@ services:
# cluster via the K8s API.
# Backend accesses sandboxes directly via host.docker.internal:{NodePort}.
provisioner:
profiles:
- provisioner
build:
context: ./provisioner
dockerfile: Dockerfile
@@ -59,20 +57,25 @@ services:
# ── Reverse Proxy ──────────────────────────────────────────────────────
# Routes API traffic to gateway/langgraph and (optionally) provisioner.
# Select nginx config via NGINX_CONF:
# - nginx.local.conf (default): no provisioner route (local/aio modes)
# - nginx.conf: includes provisioner route (provisioner mode)
# LANGGRAPH_UPSTREAM and LANGGRAPH_REWRITE control gateway vs standard
# routing (processed by envsubst at container start).
nginx:
image: nginx:alpine
container_name: deer-flow-nginx
ports:
- "2026:2026"
volumes:
- ./nginx/${NGINX_CONF:-nginx.conf}:/etc/nginx/nginx.conf:ro
- ./nginx/nginx.conf:/etc/nginx/nginx.conf.template:ro
environment:
- LANGGRAPH_UPSTREAM=${LANGGRAPH_UPSTREAM:-langgraph:2024}
- LANGGRAPH_REWRITE=${LANGGRAPH_REWRITE:-/}
command: >
sh -c "envsubst '$$LANGGRAPH_UPSTREAM $$LANGGRAPH_REWRITE'
< /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf
&& nginx -g 'daemon off;'"
depends_on:
- frontend
- gateway
- langgraph
networks:
- deer-flow-dev
restart: unless-stopped