ovapi / docker-compose.hf.yml
gallyga's picture
Upload 2 files
20a33b1 verified
# Hugging Face 部署用的 docker-compose 文件(仅供参考)
# 注意:Hugging Face Spaces 不支持 docker-compose,此文件仅用于本地测试
version: '3.8'
services:
veloera:
image: ghcr.io/veloera/veloera:latest
container_name: veloera-hf
restart: unless-stopped
ports:
- "7860:7860"
environment:
- PORT=7860
- TZ=Asia/Shanghai
# 以下环境变量需要根据实际情况配置
# - SQL_DSN=postgres://user:pass@host:5432/dbname?sslmode=require
# - REDIS_CONN_STRING=redis://user:pass@host:6379/0
# - SESSION_SECRET=your-random-secret-string
# - FRONTEND_BASE_URL=https://your-space-name.hf.space
# - GENERATE_DEFAULT_TOKEN=false
# - STREAMING_TIMEOUT=60
volumes:
- ./data:/data
- ./logs:/app/logs
command: ["/veloera", "--port", "7860", "--log-dir", "/app/logs"]
healthcheck:
test: ["CMD-SHELL", "wget -q -O - http://localhost:7860/api/status | grep -o '\"success\":\\s*true' | awk -F: '{print $$2}'"]
interval: 30s
timeout: 10s
retries: 3