Files
FastGateway/docker-compose.yml
token 64ed8e3c74 fix: 避免明文上游 h2c 探测耗尽文件描述符
普通 http:// 上游固定 HTTP/1.1,并让 YARP cluster 共用一份出站连接池,避免 prior-knowledge 失败后套接字翻倍。容器提高 nofile,并以 root 运行以免 bind mount 的 data/certs 无法写入。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-14 10:27:30 +08:00

25 lines
761 B
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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