-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
37 lines (35 loc) · 854 Bytes
/
docker-compose.yml
File metadata and controls
37 lines (35 loc) · 854 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
version: '3.8'
services:
video-parser:
build:
context: .
dockerfile: Dockerfile
container_name: video-parser
restart: unless-stopped
ports:
- "5001:5001" # FastAPI 后端
- "7860:7860" # Gradio 前端
volumes:
# 持久化存储
- ./static/videos:/app/static/videos
- ./static/images:/app/static/images
- ./downloads:/app/downloads
- ./cache:/app/cache
- ./logs:/app/logs
# 从 .env 文件加载环境变量
env_file:
- .env
environment:
- TZ=Asia/Shanghai
- PYTHONUNBUFFERED=1
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5001/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
networks:
- video-parser-network
networks:
video-parser-network:
driver: bridge