version: '3' services: texas_ai: restart: always container_name: texas_ai image: repo.qianz.com/texas_ai/texas_ai:v1.0.0 ports: - "5000:5000" deploy: mode: replicated replicas: 1 restart_policy: condition: on-failure environment: WORKER: 8 # 进程数据, 如果机器只有一个服务, 设置为2 * cpu + 1 WORKER_CLASS: "gevent" # 异步方式,无需修改 logging: driver: "json-file" options: max-size: "500m" max-file: "5"