fix: 修复前端访问错误
This commit is contained in:
@@ -22,6 +22,18 @@ services:
|
||||
context: ./backend
|
||||
container_name: exam-helper-backend
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test:
|
||||
[
|
||||
"CMD",
|
||||
"python",
|
||||
"-c",
|
||||
"import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health', timeout=3).read()",
|
||||
]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 12
|
||||
start_period: 25s
|
||||
# AI 相关变量优先从 .env.example 注入;若存在 .env 则覆盖同名项(见 Compose env_file 顺序)
|
||||
env_file:
|
||||
- .env.example
|
||||
@@ -46,7 +58,8 @@ services:
|
||||
container_name: exam-helper-frontend
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- backend
|
||||
backend:
|
||||
condition: service_healthy
|
||||
ports:
|
||||
- "127.0.0.1:8173:80"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user