From f88fc8bac530409609dbf525265e2a0440423ca2 Mon Sep 17 00:00:00 2001 From: aaron <> Date: Sun, 28 Dec 2025 10:40:29 +0800 Subject: [PATCH] 1 --- .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 5663bb0..982453b 100644 --- a/.env.docker +++ b/.env.docker @@ -8,7 +8,7 @@ REDIS_DB=0 # API配置 API_HOST=0.0.0.0 -API_PORT=8090 +API_PORT=8050 # 数据库配置(可选) # DATABASE_URL=sqlite:///./stockagent.db diff --git a/docker-compose.external-redis.yml b/docker-compose.external-redis.yml index 0e3f990..87084b9 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: - - "8090:8090" + - "8050:8050" 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=8090 + - API_PORT=8050 volumes: - ./logs:/app/logs - ./config:/app/config networks: - stockagent-network healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:8090/"] + test: ["CMD", "curl", "-f", "http://localhost:8050/"] interval: 30s timeout: 10s retries: 3 @@ -41,7 +41,7 @@ services: ports: - "5001:5001" environment: - - API_BASE_URL=http://backend:8090/api + - API_BASE_URL=http://backend:8050/api depends_on: - backend networks: diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 806b0d7..b89ce0a 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=8090 + - API_PORT=8050 - LOG_LEVEL=INFO volumes: - ./logs:/app/logs @@ -70,7 +70,7 @@ services: networks: - stockagent-network healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:8090/"] + test: ["CMD", "curl", "-f", "http://localhost:8050/"] interval: 30s timeout: 10s retries: 3 @@ -94,7 +94,7 @@ services: expose: - "5001" environment: - - API_BASE_URL=http://backend:8090/api + - API_BASE_URL=http://backend:8050/api - FLASK_ENV=production depends_on: backend: diff --git a/docker-compose.yml b/docker-compose.yml index a5e732c..f2d9163 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -27,14 +27,14 @@ services: container_name: stockagent-backend restart: unless-stopped ports: - - "8090:8090" + - "8050:8050" environment: - TUSHARE_TOKEN=${TUSHARE_TOKEN} - REDIS_HOST=redis - REDIS_PORT=6379 - REDIS_DB=0 - API_HOST=0.0.0.0 - - API_PORT=8090 + - API_PORT=8050 volumes: - ./logs:/app/logs - ./config:/app/config @@ -44,7 +44,7 @@ services: networks: - stockagent-network healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:8090/"] + test: ["CMD", "curl", "-f", "http://localhost:8050/"] interval: 30s timeout: 10s retries: 3 @@ -60,7 +60,7 @@ services: ports: - "5001:5001" environment: - - API_BASE_URL=http://backend:8090/api + - API_BASE_URL=http://backend:8050/api depends_on: backend: condition: service_healthy diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 3f6f5ae..c99165f 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -46,7 +46,7 @@ http { } upstream api { - server backend:8090; + server backend:8050; } # HTTP服务器配置