Skip to content

Commit

Permalink
fix: deprecated some linux params
Browse files Browse the repository at this point in the history
  • Loading branch information
WGrape committed Mar 9, 2023
1 parent 8904e5a commit 42bcf8e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# this will pull lastest version
# https://hub.docker.com/r/openresty/openresty/tags?page=1&name=centos
# FROM openresty/openresty:centos
# FROM --platform=linux/amd64 openresty/openresty:1.21.4.1-4-centos7
# FROM --platform=linux/amd64 openresty/openresty:1.21.4.1-4-centos7-amd64
FROM --platform=linux/amd64 openresty/openresty:1.21.4.1-4-centos7

# not ENV TZ "Asia/Shanghai"
Expand Down
5 changes: 2 additions & 3 deletions bin/ngxway
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ function start(){
docker run --ulimit nofile=$softNoFile:$hardNoFile \
--sysctl net.ipv4.ip_local_port_range="$ipLocalPortRange" \
--sysctl net.core.somaxconn="$soMaxConn" \
--sysctl net.ipv4.tcp_tw_reuse="$tcpTWReuse" \
--sysctl net.ipv4.tcp_max_tw_buckets="$tcpMaxTWBuckets" \
--sysctl net.ipv4.tcp_syncookies="$tcpSyncookies" \
--cpus=$maxNCPU \
--name ngxwayContainer -d -p $ngxwayAddr:8090 -p 8000:8000 -v $localVolumeLogsDir:/dist/logs/ ngxway
if [ $? -ne 0 ]; then
Expand All @@ -59,6 +56,8 @@ function start(){
fi
elif [ $dockerNetwork == "host" ]; then
docker run --ulimit nofile=$softNoFile:$hardNoFile \
--sysctl net.ipv4.ip_local_port_range="$ipLocalPortRange" \
--sysctl net.core.somaxconn="$soMaxConn" \
--cpus=$maxNCPU \
--name ngxwayContainer -d --net=host -v $localVolumeLogsDir:/dist/logs/ ngxway
if [ $? -ne 0 ]; then
Expand Down
6 changes: 3 additions & 3 deletions ngxway.conf
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ max_ncpu=8
# The network option of docker.[bridge/host]
docker_network=host
# The linux system params in docker.
tcp_syncookies=0
tcp_max_tw_buckets=700
tcp_tw_reuse=1
somaxconn=262155
ip_local_port_range=1024 65535
soft_nofile=1048576
hard_nofile=1048576
tcp_syncookies=0 # Deprecated
tcp_max_tw_buckets=700 # Deprecated
tcp_tw_reuse=1 # Deprecated

0 comments on commit 42bcf8e

Please sign in to comment.