File size: 1,090 Bytes
20a33b1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# 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