forked from jihe520/MathModelAgent
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
47 lines (42 loc) · 1023 Bytes
/
docker-compose.prod.yml
File metadata and controls
47 lines (42 loc) · 1023 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
39
40
41
42
43
44
45
46
# docker-compose.prod.yml
services:
redis:
image: redis:alpine
container_name: mathmodelagent_redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
restart: unless-stopped
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: mathmodelagent_backend
ports:
- "8000:8000"
env_file:
- ./backend/.env.dev # 可按需改为 .env.prod
environment:
- ENV=DEV # 可按需改为 PROD
# 仅保留生成文件目录为命名卷,移除源码映射
volumes:
- backend_work_dir:/app/project/work_dir
depends_on:
- redis
restart: unless-stopped
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: mathmodelagent_frontend
ports:
- "5173:5173"
env_file:
- ./frontend/.env.development # 可按需改为 .env.production
depends_on:
- backend
restart: unless-stopped
volumes:
redis_data:
backend_work_dir: