services: gemini-api: build: . container_name: gemini-business2api ports: - "7860:7860" volumes: - ./data:/app/data env_file: - .env restart: unless-stopped # 健康检查 healthcheck: test: ["CMD", "curl", "-f", "http://localhost:7860/admin/health"] interval: 30s timeout: 10s retries: 3 start_period: 10s # 日志限制 logging: driver: json-file options: max-size: "10m" max-file: "3"