mirror of
https://github.com/239573049/FastGateway.git
synced 2026-10-16 21:10:58 +08:00
64ed8e3c74
普通 http:// 上游固定 HTTP/1.1,并让 YARP cluster 共用一份出站连接池,避免 prior-knowledge 失败后套接字翻倍。容器提高 nofile,并以 root 运行以免 bind mount 的 data/certs 无法写入。 Co-authored-by: Cursor <cursoragent@cursor.com>
25 lines
761 B
YAML
25 lines
761 B
YAML
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
|