更新端口号

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配置
API_HOST=0.0.0.0 API_HOST=0.0.0.0
API_PORT=8000 API_PORT=8090
# 数据库配置(可选) # 数据库配置(可选)
# DATABASE_URL=sqlite:///./stockagent.db # DATABASE_URL=sqlite:///./stockagent.db

View File

@ -9,21 +9,21 @@ services:
container_name: stockagent-backend container_name: stockagent-backend
restart: unless-stopped restart: unless-stopped
ports: ports:
- "8000:8000" - "8090:8090"
environment: environment:
- TUSHARE_TOKEN=${TUSHARE_TOKEN} - TUSHARE_TOKEN=${TUSHARE_TOKEN}
- REDIS_HOST=host.docker.internal # 连接到宿主机的Redis - REDIS_HOST=host.docker.internal # 连接到宿主机的Redis
- REDIS_PORT=6379 - REDIS_PORT=6379
- REDIS_DB=0 # 可以使用不同的数据库编号避免冲突 - REDIS_DB=0 # 可以使用不同的数据库编号避免冲突
- API_HOST=0.0.0.0 - API_HOST=0.0.0.0
- API_PORT=8000 - API_PORT=8090
volumes: volumes:
- ./logs:/app/logs - ./logs:/app/logs
- ./config:/app/config - ./config:/app/config
networks: networks:
- stockagent-network - stockagent-network
healthcheck: healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/"] test: ["CMD", "curl", "-f", "http://localhost:8090/"]
interval: 30s interval: 30s
timeout: 10s timeout: 10s
retries: 3 retries: 3
@ -41,7 +41,7 @@ services:
ports: ports:
- "5001:5001" - "5001:5001"
environment: environment:
- API_BASE_URL=http://backend:8000/api - API_BASE_URL=http://backend:8090/api
depends_on: depends_on:
- backend - backend
networks: networks:

View File

@ -59,7 +59,7 @@ services:
- REDIS_PORT=6379 - REDIS_PORT=6379
- REDIS_DB=0 - REDIS_DB=0
- API_HOST=0.0.0.0 - API_HOST=0.0.0.0
- API_PORT=8000 - API_PORT=8090
- LOG_LEVEL=INFO - LOG_LEVEL=INFO
volumes: volumes:
- ./logs:/app/logs - ./logs:/app/logs
@ -70,7 +70,7 @@ services:
networks: networks:
- stockagent-network - stockagent-network
healthcheck: healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/"] test: ["CMD", "curl", "-f", "http://localhost:8090/"]
interval: 30s interval: 30s
timeout: 10s timeout: 10s
retries: 3 retries: 3
@ -94,7 +94,7 @@ services:
expose: expose:
- "5001" - "5001"
environment: environment:
- API_BASE_URL=http://backend:8000/api - API_BASE_URL=http://backend:8090/api
- FLASK_ENV=production - FLASK_ENV=production
depends_on: depends_on:
backend: backend:

View File

@ -27,14 +27,14 @@ services:
container_name: stockagent-backend container_name: stockagent-backend
restart: unless-stopped restart: unless-stopped
ports: ports:
- "8000:8000" - "8090:8090"
environment: environment:
- TUSHARE_TOKEN=${TUSHARE_TOKEN} - TUSHARE_TOKEN=${TUSHARE_TOKEN}
- REDIS_HOST=redis - REDIS_HOST=redis
- REDIS_PORT=6379 - REDIS_PORT=6379
- REDIS_DB=0 - REDIS_DB=0
- API_HOST=0.0.0.0 - API_HOST=0.0.0.0
- API_PORT=8000 - API_PORT=8090
volumes: volumes:
- ./logs:/app/logs - ./logs:/app/logs
- ./config:/app/config - ./config:/app/config
@ -44,7 +44,7 @@ services:
networks: networks:
- stockagent-network - stockagent-network
healthcheck: healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/"] test: ["CMD", "curl", "-f", "http://localhost:8090/"]
interval: 30s interval: 30s
timeout: 10s timeout: 10s
retries: 3 retries: 3
@ -60,7 +60,7 @@ services:
ports: ports:
- "5001:5001" - "5001:5001"
environment: environment:
- API_BASE_URL=http://backend:8000/api - API_BASE_URL=http://backend:8090/api
depends_on: depends_on:
backend: backend:
condition: service_healthy condition: service_healthy

View File

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