From 211cc690813a56f8ae3a2b3d3ae64b5c7f831d3a Mon Sep 17 00:00:00 2001 From: aaron <> Date: Sun, 28 Dec 2025 10:38:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=AB=AF=E5=8F=A3=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.docker | 2 +- docker-compose.external-redis.yml | 8 ++++---- docker-compose.prod.yml | 6 +++--- docker-compose.yml | 8 ++++---- nginx/nginx.conf | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.env.docker b/.env.docker index 51c3c80..5663bb0 100644 --- a/.env.docker +++ b/.env.docker @@ -8,7 +8,7 @@ REDIS_DB=0 # API配置 API_HOST=0.0.0.0 -API_PORT=8000 +API_PORT=8090 # 数据库配置(可选) # DATABASE_URL=sqlite:///./stockagent.db diff --git a/docker-compose.external-redis.yml b/docker-compose.external-redis.yml index 178f3c3..0e3f990 100644 --- a/docker-compose.external-redis.yml +++ b/docker-compose.external-redis.yml @@ -9,21 +9,21 @@ services: container_name: stockagent-backend restart: unless-stopped ports: - - "8000:8000" + - "8090:8090" environment: - TUSHARE_TOKEN=${TUSHARE_TOKEN} - REDIS_HOST=host.docker.internal # 连接到宿主机的Redis - REDIS_PORT=6379 - REDIS_DB=0 # 可以使用不同的数据库编号避免冲突 - API_HOST=0.0.0.0 - - API_PORT=8000 + - API_PORT=8090 volumes: - ./logs:/app/logs - ./config:/app/config networks: - stockagent-network healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:8000/"] + test: ["CMD", "curl", "-f", "http://localhost:8090/"] interval: 30s timeout: 10s retries: 3 @@ -41,7 +41,7 @@ services: ports: - "5001:5001" environment: - - API_BASE_URL=http://backend:8000/api + - API_BASE_URL=http://backend:8090/api depends_on: - backend networks: diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index ee2bcc6..806b0d7 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -59,7 +59,7 @@ services: - REDIS_PORT=6379 - REDIS_DB=0 - API_HOST=0.0.0.0 - - API_PORT=8000 + - API_PORT=8090 - LOG_LEVEL=INFO volumes: - ./logs:/app/logs @@ -70,7 +70,7 @@ services: networks: - stockagent-network healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:8000/"] + test: ["CMD", "curl", "-f", "http://localhost:8090/"] interval: 30s timeout: 10s retries: 3 @@ -94,7 +94,7 @@ services: expose: - "5001" environment: - - API_BASE_URL=http://backend:8000/api + - API_BASE_URL=http://backend:8090/api - FLASK_ENV=production depends_on: backend: diff --git a/docker-compose.yml b/docker-compose.yml index fc18376..a5e732c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -27,14 +27,14 @@ services: container_name: stockagent-backend restart: unless-stopped ports: - - "8000:8000" + - "8090:8090" environment: - TUSHARE_TOKEN=${TUSHARE_TOKEN} - REDIS_HOST=redis - REDIS_PORT=6379 - REDIS_DB=0 - API_HOST=0.0.0.0 - - API_PORT=8000 + - API_PORT=8090 volumes: - ./logs:/app/logs - ./config:/app/config @@ -44,7 +44,7 @@ services: networks: - stockagent-network healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:8000/"] + test: ["CMD", "curl", "-f", "http://localhost:8090/"] interval: 30s timeout: 10s retries: 3 @@ -60,7 +60,7 @@ services: ports: - "5001:5001" environment: - - API_BASE_URL=http://backend:8000/api + - API_BASE_URL=http://backend:8090/api depends_on: backend: condition: service_healthy diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 196a8e8..3f6f5ae 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -46,7 +46,7 @@ http { } upstream api { - server backend:8000; + server backend:8090; } # HTTP服务器配置