-
Notifications
You must be signed in to change notification settings - Fork 10
/
docker-compose.yml
44 lines (44 loc) · 2.05 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
version: "3"
networks:
gatewaybranch:
driver: bridge
name: branch
services:
branch-master:
image: "yedajiang44/gatewaybranch:latest"
container_name: branch-master
restart: always
privileged: true
environment:
TZ: Asia/Shanghai
Gateway__TcpPort__0: 80 # 被转发的端口
Gateway__TcpPort__1: 81
Gateway__ReaderIdleTimeSeconds: 500
Gateway__WriterIdleTimeSeconds: 0 # 默认300,单位 秒
Gateway__BrabchServerReaderIdleTimeSeconds: 500
Gateway__BrabchServerWriterIdleTimeSeconds: 500
Gateway__BrabchServer__0__Ip: host.docker.internal # 分流服务1的ip
Gateway__BrabchServer__0__Port: 8008 #分流服务1的端口
Gateway__BrabchServer__0__NeedReply: "true" #分流服务1需要下发回复
Gateway__BrabchServer__1__Ip: host.docker.internal
Gateway__BrabchServer__1__Port: 8009
Gateway__BrabchServer__1__NeedReply: "true"
NLog__targets__logconsole__type: Console
NLog__rules__0__logger: "*"
NLog__rules__0__minLevel: Info
NLog__rules__0__writeTo: logconsole
logging:
driver: "json-file"
options:
max-size: "50m"
sysctls:
- net.ipv4.ip_local_port_range=2048 65535 #可用端口范围
- net.ipv4.tcp_max_tw_buckets=30 #系统允许TIME_WAIT套接字数量的最大值, 如果超过这个数字,TIME_WAIT套接字将立刻被清除并打印警告信息。
- net.ipv4.tcp_tw_reuse=1 #开启重用,表示是否允许将处于TIME-WAIT状态的socket(TIME-WAIT的端口)用于新的TCP连接 。
- net.ipv4.tcp_fin_timeout=5 #对于本端断开的socket连接,TCP保持在FIN-WAIT-2状态的时间(秒)。对方可能会断开连接或一直不结束连接或不可预料的进程死亡。
- net.ipv4.tcp_timestamps=1 #TCP时间戳(会在TCP包头增加12个字节),以一种比重发超时更精确的方法(参考RFC 1323)来启用对RTT 的计算,为实现更好的性能应该启用这个选项。
ports:
- 808:80
- 809:81
networks:
- gatewaybranch