File size: 782 Bytes
00414e6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
version: '3.8'

services:
  droid2api:
    build: .
    container_name: droid2api
    ports:
      - "3000:3000"
    environment:
      # 认证配置(按优先级选择其一):
      # 最高优先级:固定API密钥(推荐用于生产环境)
      - FACTORY_API_KEY=${FACTORY_API_KEY}
      # 次优先级:refresh token自动刷新机制
      - DROID_REFRESH_KEY=${DROID_REFRESH_KEY}
      # 可选:如果需要修改端口,在config.json中配置
    volumes:
      # 可选:持久化auth.json以保存刷新的tokens
      - ./data:/app/data
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3000/"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 40s