services: fast-gateway.service: image: registry.cn-shenzhen.aliyuncs.com/token-ai/fast-gateway container_name: fast-gateway restart: always # chiseled 基础镜像默认 UID 1654,bind mount 的 data/certs 会写不进。以 root 运行即可。 user: "0:0" build: context: . dockerfile: src/FastGateway/Dockerfile volumes: - ./data:/app/data - ./certs:/app/certs ports: - "8000:8080" - "80:80" - "443:443/udp" - "443:443/tcp" # chiseled 镜像无 shell,无法在容器内 ulimit;默认 nofile=1024 时 # 出站连接 + TIME_WAIT 很容易打出 ENFILE(Too many open files in system) ulimits: nofile: soft: 65535 hard: 65535