docker-compose.yml
979 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
services:
backend:
build:
context: .
dockerfile: Dockerfile
container_name: wiki-backend
restart: always
environment:
# 保持与 DB 环境变量联动
- DB_HOST=${DB_HOST:-db}
- DB_PORT=${DB_PORT:-3306}
- DB_USER=${DB_USER:-wiki_user}
- DB_PASSWORD=${DB_PASSWORD:-wikidbpassword}
- DB_NAME=ai_multi_agentic
# 需要时在服务器系统环境变量或者 .env 里配置大模型 API Key
- DASHSCOPE_API_KEY=${DASHSCOPE_API_KEY}
ports:
- "8104:8104"
volumes:
- ./ware:/app/ware
- ./logs:/app/logs
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
args:
- NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL:-http://localhost:8104}
container_name: wiki-frontend
restart: always
depends_on:
- backend
environment:
- NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL:-http://localhost:8104}
ports:
- "3000:3000"