更新端口号

This commit is contained in:
aaron 2025-12-28 10:38:11 +08:00
parent 9d50a2bae8
commit 211cc69081
5 changed files with 13 additions and 13 deletions

View File

@ -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

View File

@ -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:

View File

@ -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:

View File

@ -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

View File

@ -46,7 +46,7 @@ http {
}
upstream api {
server backend:8000;
server backend:8090;
}
# HTTP服务器配置