Skip to content

Commit

Permalink
Merge branch 'build_native_php' into php-fpm
Browse files Browse the repository at this point in the history
  • Loading branch information
jingjingxyk committed Aug 7, 2024
2 parents c738d4d + fcb812e commit 6078d75
Showing 1 changed file with 37 additions and 1 deletion.
38 changes: 37 additions & 1 deletion setup-php-fpm-runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ case $ARCH in
'x86_64')
ARCH="x64"
;;
'aarch64' | 'arm64' )
'aarch64' | 'arm64')
ARCH="arm64"
;;
*)
Expand Down Expand Up @@ -148,6 +148,42 @@ expose_php=Off
EOF

cat >${__PROJECT__}/bin/runtime/php-fpm.conf <<'EOF'
; 更多配置参考
; https://github.com/php/php-src/blob/master/sapi/fpm/www.conf.in
; https://github.com/php/php-src/blob/master/sapi/fpm/php-fpm.conf.in
[global]
pid = run/php-fpm.pid
error_log = log/php-fpm.log
daemonize = yes
[www]
user = nobody
group = nobody
listen = 9001
;listen = run/php-fpm.sock
slowlog = log/$pool.log.slow
request_slowlog_timeout = 30s
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
; MAIN_PID=$(cat var/run/php-fpm.pid)
; 关闭 php-fpm
; kill -QUIT $MAIN_PID
; 平滑重启 php-fpm
; kill -USR2 $MAIN_PID
EOF

cd ${__PROJECT__}/

set +x
Expand Down

0 comments on commit 6078d75

Please sign in to comment.