mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-21 05:14:45 +08:00
fix(docker): update nginx configuration and simplify docker script (#903)
This commit is contained in:
@@ -66,7 +66,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "2026:2026"
|
- "2026:2026"
|
||||||
volumes:
|
volumes:
|
||||||
- ./nginx/${NGINX_CONF:-nginx.local.conf}:/etc/nginx/nginx.conf:ro
|
- ./nginx/${NGINX_CONF:-nginx.conf}:/etc/nginx/nginx.conf:ro
|
||||||
depends_on:
|
depends_on:
|
||||||
- frontend
|
- frontend
|
||||||
- gateway
|
- gateway
|
||||||
|
|||||||
@@ -30,10 +30,6 @@ http {
|
|||||||
server frontend:3000;
|
server frontend:3000;
|
||||||
}
|
}
|
||||||
|
|
||||||
upstream provisioner {
|
|
||||||
server provisioner:8002;
|
|
||||||
}
|
|
||||||
|
|
||||||
# ── Main server (path-based routing) ─────────────────────────────────
|
# ── Main server (path-based routing) ─────────────────────────────────
|
||||||
server {
|
server {
|
||||||
listen 2026 default_server;
|
listen 2026 default_server;
|
||||||
@@ -189,8 +185,11 @@ http {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# ── Provisioner API (sandbox management) ────────────────────────
|
# ── Provisioner API (sandbox management) ────────────────────────
|
||||||
|
# Use a variable so nginx resolves provisioner at request time (not startup).
|
||||||
|
# This allows nginx to start even when provisioner container is not running.
|
||||||
location /api/sandboxes {
|
location /api/sandboxes {
|
||||||
proxy_pass http://provisioner;
|
set $provisioner_upstream provisioner:8002;
|
||||||
|
proxy_pass http://$provisioner_upstream;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
|||||||
@@ -95,7 +95,6 @@ init() {
|
|||||||
# Start Docker development environment
|
# Start Docker development environment
|
||||||
start() {
|
start() {
|
||||||
local sandbox_mode
|
local sandbox_mode
|
||||||
local nginx_conf
|
|
||||||
local services
|
local services
|
||||||
|
|
||||||
echo "=========================================="
|
echo "=========================================="
|
||||||
@@ -106,10 +105,8 @@ start() {
|
|||||||
sandbox_mode="$(detect_sandbox_mode)"
|
sandbox_mode="$(detect_sandbox_mode)"
|
||||||
|
|
||||||
if [ "$sandbox_mode" = "provisioner" ]; then
|
if [ "$sandbox_mode" = "provisioner" ]; then
|
||||||
nginx_conf="nginx.conf"
|
|
||||||
services="frontend gateway langgraph provisioner nginx"
|
services="frontend gateway langgraph provisioner nginx"
|
||||||
else
|
else
|
||||||
nginx_conf="nginx.local.conf"
|
|
||||||
services="frontend gateway langgraph nginx"
|
services="frontend gateway langgraph nginx"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -129,7 +126,7 @@ start() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Building and starting containers..."
|
echo "Building and starting containers..."
|
||||||
cd "$DOCKER_DIR" && NGINX_CONF="$nginx_conf" $COMPOSE_CMD up --build -d --remove-orphans $services
|
cd "$DOCKER_DIR" && $COMPOSE_CMD up --build -d --remove-orphans $services
|
||||||
echo ""
|
echo ""
|
||||||
echo "=========================================="
|
echo "=========================================="
|
||||||
echo " DeerFlow Docker is starting!"
|
echo " DeerFlow Docker is starting!"
|
||||||
|
|||||||
Reference in New Issue
Block a user