hs-video-api/docker-compose.yml
2025-06-07 00:28:35 +08:00

60 lines
1.2 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

version: '3.8'
services:
video-api:
build: .
container_name: hs-video-api
ports:
- "5000:5000"
environment:
- FLASK_ENV=production
- SECRET_KEY=your-secret-key-here
volumes:
- ./logs:/app/logs
- ./uploads:/app/uploads
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
networks:
- video-api-network
# 可选添加Redis用于任务状态持久化
# redis:
# image: redis:7-alpine
# container_name: hs-video-redis
# ports:
# - "6379:6379"
# volumes:
# - redis_data:/data
# restart: unless-stopped
# networks:
# - video-api-network
# 可选添加Nginx反向代理
# nginx:
# image: nginx:alpine
# container_name: hs-video-nginx
# ports:
# - "80:80"
# - "443:443"
# volumes:
# - ./nginx.conf:/etc/nginx/nginx.conf:ro
# - ./ssl:/etc/nginx/ssl:ro
# depends_on:
# - video-api
# restart: unless-stopped
# networks:
# - video-api-network
networks:
video-api-network:
driver: bridge
volumes:
# redis_data:
logs:
uploads: