mirror of
https://github.com/pooneyy/1Panel-Appstore.git
synced 2026-04-21 21:19:35 +08:00
feat: 增加 PHP 5 7 版本
This commit is contained in:
parent
1d17274db2
commit
685770b385
6
php/5/.env
Normal file
6
php/5/.env
Normal file
@ -0,0 +1,6 @@
|
||||
PHP_VERSION=
|
||||
CONTAINER_PACKAGE_URL=
|
||||
PHP_EXTENSIONS=
|
||||
IMAGE_NAME=
|
||||
TZ="Asia/Shanghai"
|
||||
EXTENSION_DIR="/usr/local/lib/php/extensions/no-debug-non-zts-20230831"
|
||||
24
php/5/build/Dockerfile
Normal file
24
php/5/build/Dockerfile
Normal file
@ -0,0 +1,24 @@
|
||||
ARG PHP_IMAGE
|
||||
FROM ${PHP_IMAGE}
|
||||
|
||||
ARG PHP_EXTENSIONS
|
||||
ARG CONTAINER_PACKAGE_URL
|
||||
|
||||
RUN sed -i "s|URIs: http://deb.debian.org/debian|URIs: ${CONTAINER_PACKAGE_URL}/debian|g" /etc/apt/sources.list.d/debian.sources && \
|
||||
cat /etc/apt/sources.list.d/debian.sources && \
|
||||
apt-get update
|
||||
|
||||
COPY data/install-ext /usr/local/bin/
|
||||
RUN chmod uga+x /usr/local/bin/install-ext
|
||||
|
||||
ENV PHP_INI_SCAN_DIR=/usr/local/etc/php/conf.d
|
||||
|
||||
RUN install-ext ${PHP_EXTENSIONS}
|
||||
|
||||
RUN pear config-set php_ini /usr/local/etc/php/php.ini
|
||||
|
||||
RUN usermod -u 1000 www-data && groupmod -g 1000 www-data
|
||||
|
||||
ENTRYPOINT ["supervisord", "--nodaemon", "--configuration", "/etc/supervisord.conf"]
|
||||
|
||||
WORKDIR /www
|
||||
303
php/5/build/data/install-ext
Normal file
303
php/5/build/data/install-ext
Normal file
@ -0,0 +1,303 @@
|
||||
#!/bin/bash
|
||||
|
||||
export MC="-j$(nproc)"
|
||||
|
||||
echo
|
||||
echo "============================================"
|
||||
echo "PHP version : ${PHP_VERSION}"
|
||||
echo "Install extensions : $1"
|
||||
echo "============================================"
|
||||
echo
|
||||
|
||||
isPhpVersionGreaterOrEqual() {
|
||||
local PHP_MAJOR_VERSION=$(php -r "echo PHP_MAJOR_VERSION;")
|
||||
local PHP_MINOR_VERSION=$(php -r "echo PHP_MINOR_VERSION;")
|
||||
|
||||
if [ "$PHP_MAJOR_VERSION" -gt "$1" ] || [ "$PHP_MAJOR_VERSION" -eq "$1" ] && [ "$PHP_MINOR_VERSION" -ge "$2" ]; then
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
is_extension_installed() {
|
||||
local extension=$1
|
||||
if php -m | grep -q "^$extension$"; then
|
||||
echo "------ $extension is already installed ------"
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
install_php_extensions() {
|
||||
local extension=$1
|
||||
install-php-extensions $extension
|
||||
|
||||
if is_extension_installed "$extension"; then
|
||||
echo "------ install-php-extensions $extension succeeded ------"
|
||||
return
|
||||
fi
|
||||
|
||||
echo "------ install-php-extensions $extension failed ------"
|
||||
}
|
||||
|
||||
pecl_install() {
|
||||
local extension=$1
|
||||
printf "\n" | pecl install $extension
|
||||
docker-php-ext-enable $extension
|
||||
if is_extension_installed "$extension"; then
|
||||
echo "------ pecl install $extension succeeded ------"
|
||||
return
|
||||
fi
|
||||
echo "------ pecl install $extension failed ------"
|
||||
}
|
||||
|
||||
docker_php_ext_install() {
|
||||
local extension=$1
|
||||
docker-php-ext-install $extension
|
||||
if is_extension_installed "$extension"; then
|
||||
echo "------ docker-php-ext-install install $extension succeeded ------"
|
||||
return
|
||||
fi
|
||||
echo "------ docker-php-ext-install install $extension failed------"
|
||||
}
|
||||
|
||||
install_extension_default() {
|
||||
local extension=$1
|
||||
printf "\n" | pecl install $extension
|
||||
if [ $? -eq 0 ]; then
|
||||
docker-php-ext-enable $extension
|
||||
echo "------ pecl install $extension succeeded ------"
|
||||
else
|
||||
echo "------ pecl install $extension failed use docker-php-ext-install------"
|
||||
docker-php-ext-install ${MC} $extension
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "------ docker-php-ext-install install $extension succeeded ------"
|
||||
else
|
||||
echo "------ docker-php-ext-install install $extension failed use install-php-extensions------"
|
||||
install-php-extensions $extension
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "------ install-php-extensions $extension succeeded ------"
|
||||
else
|
||||
echo "------ install-php-extensions $extension failed ------"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
install_gd() {
|
||||
isPhpVersionGreaterOrEqual 8 0
|
||||
if [ "$?" = "1" ]; then
|
||||
# "--with-xxx-dir" was removed from php 7.4,
|
||||
# issue: https://github.com/docker-library/php/issues/912
|
||||
options="--with-freetype --with-jpeg --with-webp"
|
||||
else
|
||||
options="--with-gd --with-freetype-dir=/usr/include/ --with-png-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-webp-dir=/usr/include/"
|
||||
fi
|
||||
apt-get install -y \
|
||||
libfreetype6 \
|
||||
libfreetype6-dev \
|
||||
libpng-dev \
|
||||
libwebp-dev \
|
||||
libjpeg-dev \
|
||||
&& docker-php-ext-configure gd ${options} \
|
||||
&& docker-php-ext-install ${MC} gd \
|
||||
&& apt-get purge -y \
|
||||
libfreetype6-dev \
|
||||
libpng-dev \
|
||||
&& apt-get autoremove -y
|
||||
}
|
||||
|
||||
|
||||
install_msg() {
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "------ install $1 succeeded ------"
|
||||
else
|
||||
echo "------ install $1 failed ------"
|
||||
fi
|
||||
}
|
||||
|
||||
install_memcache() {
|
||||
printf "\n" | pecl install memcache
|
||||
install_msg memcache
|
||||
docker-php-ext-enable memcache
|
||||
}
|
||||
|
||||
install_pdo_pgsql() {
|
||||
apt-get update && apt-get install -y libpq-dev
|
||||
install_msg pdo_pgsql
|
||||
docker-php-ext-install pdo_pgsql
|
||||
}
|
||||
|
||||
install_pdo_mysql() {
|
||||
docker-php-ext-install pdo_mysql
|
||||
install_msg pdo_mysql
|
||||
}
|
||||
|
||||
install_yaf() {
|
||||
pecl install yaf
|
||||
install_msg yaf
|
||||
docker-php-ext-enable yaf
|
||||
}
|
||||
|
||||
install_extension() {
|
||||
local extension=$1
|
||||
if is_extension_installed "$extension"; then
|
||||
return
|
||||
fi
|
||||
|
||||
echo "------ install extension: $extension ------"
|
||||
|
||||
if [ "$extension" = "gd" ]; then
|
||||
install_gd
|
||||
elif [ "$extension" = "memcache" ]; then
|
||||
install_memcache
|
||||
elif [ "$extension" = "yaf" ]; then
|
||||
install_yaf
|
||||
elif [ "$extension" = "pdo_pgsql" ]; then
|
||||
install_pdo_pgsql
|
||||
elif [ "$extension" = "pdo_mysql" ]; then
|
||||
install_pdo_mysql
|
||||
elif [ "$extension" = "yaml" ]; then
|
||||
apt-get install -y libyaml-dev
|
||||
pecl_install yaml
|
||||
elif [ "$extension" = "mongodb" ]; then
|
||||
apt-get install -y libssl-dev
|
||||
pecl_install mongodb
|
||||
elif [ "$extension" = "mcrypt" ]; then
|
||||
apt-get install -y libmcrypt-dev
|
||||
pecl_install mcrypt
|
||||
elif [ "$extension" = "ssh2" ]; then
|
||||
apt-get install -y libssh2-1-dev libssh2-1
|
||||
pecl_install ssh2
|
||||
elif [ "$extension" = "rdkafka" ]; then
|
||||
apt-get install -y librdkafka-dev
|
||||
pecl_install rdkafka
|
||||
elif [ "$extension" = "varnish" ]; then
|
||||
apt-get install -y libvarnishapi-dev
|
||||
pecl_install varnish
|
||||
elif [ "$extension" = "bcmath" ]; then
|
||||
docker_php_ext_install bcmath
|
||||
elif [ "$extension" = "pcntl" ]; then
|
||||
docker_php_ext_install pcntl
|
||||
elif [ "$extension" = "shmop" ]; then
|
||||
docker_php_ext_install shmop
|
||||
elif [ "$extension" = "gettext" ]; then
|
||||
docker_php_ext_install gettext
|
||||
elif [ "$extension" = "sockets" ]; then
|
||||
docker_php_ext_install sockets
|
||||
elif [ "$extension" = "sysvsem" ]; then
|
||||
docker_php_ext_install sysvsem
|
||||
elif [ "$extension" = "sysvmsg" ]; then
|
||||
docker_php_ext_install sysvmsg
|
||||
elif [ "$extension" = "opcache" ]; then
|
||||
docker_php_ext_install opcache
|
||||
elif [ "$extension" = "mysqli" ]; then
|
||||
docker_php_ext_install mysqli
|
||||
elif [ "$extension" = "sysvshm" ]; then
|
||||
docker_php_ext_install sysvshm
|
||||
elif [ "$extension" = "calendar" ]; then
|
||||
docker_php_ext_install calendar
|
||||
elif [ "$extension" = "zmq" ]; then
|
||||
docker_php_ext_install zmq
|
||||
elif [ "$extension" = "sodium" ]; then
|
||||
apt-get install -y libsodium-dev
|
||||
docker_php_ext_install sodium
|
||||
elif [ "$extension" = "zip" ]; then
|
||||
apt-get update && apt-get install -y libzip-dev
|
||||
docker_php_ext_install zip
|
||||
elif [ "$extension" = "memcached" ]; then
|
||||
install_php_extensions memcached
|
||||
elif [ "$extension" = "redis" ]; then
|
||||
install_php_extensions redis
|
||||
elif [ "$extension" = "xdebug" ]; then
|
||||
install_php_extensions xdebug
|
||||
elif [ "$extension" = "imap" ]; then
|
||||
install_php_extensions imap
|
||||
elif [ "$extension" = "intl" ]; then
|
||||
install_php_extensions intl
|
||||
elif [ "$extension" = "swoole" ]; then
|
||||
install_php_extensions swoole
|
||||
elif [ "$extension" = "pgsql" ]; then
|
||||
install_php_extensions pgsql
|
||||
elif [ "$extension" = "curl" ]; then
|
||||
install_php_extensions curl
|
||||
elif [ "$extension" = "sourceguardian" ]; then
|
||||
install_php_extensions sourceguardian
|
||||
elif [ "$extension" = "snmp" ]; then
|
||||
install_php_extensions snmp
|
||||
elif [ "$extension" = "mbstring" ]; then
|
||||
install_php_extensions mbstring
|
||||
elif [ "$extension" = "pdo_firebird" ]; then
|
||||
install_php_extensions pdo_firebird
|
||||
elif [ "$extension" = "pdo_dblib" ]; then
|
||||
install_php_extensions pdo_dblib
|
||||
elif [ "$extension" = "pdo_oci" ]; then
|
||||
install_php_extensions pdo_oci
|
||||
elif [ "$extension" = "pdo_odbc" ]; then
|
||||
install_php_extensions pdo_odbc
|
||||
elif [ "$extension" = "oci8" ]; then
|
||||
install_php_extensions oci8
|
||||
elif [ "$extension" = "odbc" ]; then
|
||||
install_php_extensions odbc
|
||||
elif [ "$extension" = "soap" ]; then
|
||||
install_php_extensions soap
|
||||
elif [ "$extension" = "xsl" ]; then
|
||||
install_php_extensions xsl
|
||||
elif [ "$extension" = "xmlrpc" ]; then
|
||||
install_php_extensions xmlrpc
|
||||
elif [ "$extension" = "readline" ]; then
|
||||
install_php_extensions readline
|
||||
elif [ "$extension" = "snmp" ]; then
|
||||
install_php_extensions snmp
|
||||
elif [ "$extension" = "tidy" ]; then
|
||||
install_php_extensions tidy
|
||||
elif [ "$extension" = "gmp" ]; then
|
||||
install_php_extensions gmp
|
||||
elif [ "$extension" = "ldap" ]; then
|
||||
install_php_extensions ldap
|
||||
elif [ "$extension" = "imagick" ]; then
|
||||
install_php_extensions imagick
|
||||
elif [ "$extension" = "amqp" ]; then
|
||||
install_php_extensions amqp
|
||||
elif [ "$extension" = "zookeeper" ]; then
|
||||
install_php_extensions zookeeper
|
||||
elif [ "$extension" = "ioncube_loader" ]; then
|
||||
install_php_extensions ioncube_loader
|
||||
elif [ "$extension" = "pdo_sqlsrv" ]; then
|
||||
install_php_extensions pdo_sqlsrv
|
||||
elif [ "$extension" = "sqlsrv" ]; then
|
||||
install_php_extensions sqlsrv
|
||||
elif [ "$extension" = "enchant" ]; then
|
||||
install_php_extensions enchant
|
||||
elif [ "$extension" = "pspell" ]; then
|
||||
install_php_extensions pspell
|
||||
elif [ "$extension" = "bz2" ]; then
|
||||
install_php_extensions bz2
|
||||
elif [ "$extension" = "zmq" ]; then
|
||||
install_php_extensions zmq
|
||||
elif [ "$extension" = "smbclient" ]; then
|
||||
install_php_extensions smbclient
|
||||
elif [ "$extension" = "event" ]; then
|
||||
install_php_extensions event
|
||||
else
|
||||
install_extension_default $extension
|
||||
fi
|
||||
}
|
||||
|
||||
extension=$1
|
||||
|
||||
if [[ $extension == *,* ]]; then
|
||||
echo "${extension}" | tr ',' '\n' | while read -r extension; do
|
||||
apt-get update
|
||||
install_extension $extension
|
||||
done
|
||||
else
|
||||
apt-get update
|
||||
install_extension $extension
|
||||
fi
|
||||
|
||||
docker-php-source delete
|
||||
423
php/5/conf/php-fpm.conf
Normal file
423
php/5/conf/php-fpm.conf
Normal file
@ -0,0 +1,423 @@
|
||||
; Start a new pool named 'www'.
|
||||
; the variable $pool can be used in any directive and will be replaced by the
|
||||
; pool name ('www' here)
|
||||
[www]
|
||||
|
||||
; Per pool prefix
|
||||
; It only applies on the following directives:
|
||||
; - 'access.log'
|
||||
; - 'slowlog'
|
||||
; - 'listen' (unixsocket)
|
||||
; - 'chroot'
|
||||
; - 'chdir'
|
||||
; - 'php_values'
|
||||
; - 'php_admin_values'
|
||||
; When not set, the global prefix (or NONE) applies instead.
|
||||
; Note: This directive can also be relative to the global prefix.
|
||||
; Default Value: none
|
||||
;prefix = /path/to/pools/$pool
|
||||
|
||||
; Unix user/group of processes
|
||||
; Note: The user is mandatory. If the group is not set, the default user's group
|
||||
; will be used.
|
||||
user = www-data
|
||||
group = www-data
|
||||
|
||||
; The address on which to accept FastCGI requests.
|
||||
; Valid syntaxes are:
|
||||
; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on
|
||||
; a specific port;
|
||||
; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on
|
||||
; a specific port;
|
||||
; 'port' - to listen on a TCP socket to all addresses
|
||||
; (IPv6 and IPv4-mapped) on a specific port;
|
||||
; '/path/to/unix/socket' - to listen on a unix socket.
|
||||
; Note: This value is mandatory.
|
||||
listen = 127.0.0.1:9000
|
||||
|
||||
; Set listen(2) backlog.
|
||||
; Default Value: 511 (-1 on FreeBSD and OpenBSD)
|
||||
;listen.backlog = 511
|
||||
|
||||
; Set permissions for unix socket, if one is used. In Linux, read/write
|
||||
; permissions must be set in order to allow connections from a web server. Many
|
||||
; BSD-derived systems allow connections regardless of permissions.
|
||||
; Default Values: user and group are set as the running user
|
||||
; mode is set to 0660
|
||||
;listen.owner = www-data
|
||||
;listen.group = www-data
|
||||
;listen.mode = 0660
|
||||
; When POSIX Access Control Lists are supported you can set them using
|
||||
; these options, value is a comma separated list of user/group names.
|
||||
; When set, listen.owner and listen.group are ignored
|
||||
;listen.acl_users =
|
||||
;listen.acl_groups =
|
||||
|
||||
; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect.
|
||||
; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
|
||||
; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
|
||||
; must be separated by a comma. If this value is left blank, connections will be
|
||||
; accepted from any ip address.
|
||||
; Default Value: any
|
||||
;listen.allowed_clients = 127.0.0.1
|
||||
|
||||
; Specify the nice(2) priority to apply to the pool processes (only if set)
|
||||
; The value can vary from -19 (highest priority) to 20 (lower priority)
|
||||
; Note: - It will only work if the FPM master process is launched as root
|
||||
; - The pool processes will inherit the master process priority
|
||||
; unless it specified otherwise
|
||||
; Default Value: no set
|
||||
; process.priority = -19
|
||||
|
||||
; Set the process dumpable flag (PR_SET_DUMPABLE prctl) even if the process user
|
||||
; or group is differrent than the master process user. It allows to create process
|
||||
; core dump and ptrace the process for the pool user.
|
||||
; Default Value: no
|
||||
; process.dumpable = yes
|
||||
|
||||
; Choose how the process manager will control the number of child processes.
|
||||
; Possible Values:
|
||||
; static - a fixed number (pm.max_children) of child processes;
|
||||
; dynamic - the number of child processes are set dynamically based on the
|
||||
; following directives. With this process management, there will be
|
||||
; always at least 1 children.
|
||||
; pm.max_children - the maximum number of children that can
|
||||
; be alive at the same time.
|
||||
; pm.start_servers - the number of children created on startup.
|
||||
; pm.min_spare_servers - the minimum number of children in 'idle'
|
||||
; state (waiting to process). If the number
|
||||
; of 'idle' processes is less than this
|
||||
; number then some children will be created.
|
||||
; pm.max_spare_servers - the maximum number of children in 'idle'
|
||||
; state (waiting to process). If the number
|
||||
; of 'idle' processes is greater than this
|
||||
; number then some children will be killed.
|
||||
; ondemand - no children are created at startup. Children will be forked when
|
||||
; new requests will connect. The following parameter are used:
|
||||
; pm.max_children - the maximum number of children that
|
||||
; can be alive at the same time.
|
||||
; pm.process_idle_timeout - The number of seconds after which
|
||||
; an idle process will be killed.
|
||||
; Note: This value is mandatory.
|
||||
pm = dynamic
|
||||
|
||||
; The number of child processes to be created when pm is set to 'static' and the
|
||||
; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
|
||||
; This value sets the limit on the number of simultaneous requests that will be
|
||||
; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
|
||||
; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
|
||||
; CGI. The below defaults are based on a server without much resources. Don't
|
||||
; forget to tweak pm.* to fit your needs.
|
||||
; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
|
||||
; Note: This value is mandatory.
|
||||
pm.max_children = 10
|
||||
|
||||
; The number of child processes created on startup.
|
||||
; Note: Used only when pm is set to 'dynamic'
|
||||
; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
|
||||
pm.start_servers = 2
|
||||
|
||||
; The desired minimum number of idle server processes.
|
||||
; Note: Used only when pm is set to 'dynamic'
|
||||
; Note: Mandatory when pm is set to 'dynamic'
|
||||
pm.min_spare_servers = 1
|
||||
|
||||
; The desired maximum number of idle server processes.
|
||||
; Note: Used only when pm is set to 'dynamic'
|
||||
; Note: Mandatory when pm is set to 'dynamic'
|
||||
pm.max_spare_servers = 3
|
||||
|
||||
; The number of seconds after which an idle process will be killed.
|
||||
; Note: Used only when pm is set to 'ondemand'
|
||||
; Default Value: 10s
|
||||
;pm.process_idle_timeout = 10s;
|
||||
|
||||
; The number of requests each child process should execute before respawning.
|
||||
; This can be useful to work around memory leaks in 3rd party libraries. For
|
||||
; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
|
||||
; Default Value: 0
|
||||
;pm.max_requests = 500
|
||||
|
||||
; The URI to view the FPM status page. If this value is not set, no URI will be
|
||||
; recognized as a status page. It shows the following informations:
|
||||
; pool - the name of the pool;
|
||||
; process manager - static, dynamic or ondemand;
|
||||
; start time - the date and time FPM has started;
|
||||
; start since - number of seconds since FPM has started;
|
||||
; accepted conn - the number of request accepted by the pool;
|
||||
; listen queue - the number of request in the queue of pending
|
||||
; connections (see backlog in listen(2));
|
||||
; max listen queue - the maximum number of requests in the queue
|
||||
; of pending connections since FPM has started;
|
||||
; listen queue len - the size of the socket queue of pending connections;
|
||||
; idle processes - the number of idle processes;
|
||||
; active processes - the number of active processes;
|
||||
; total processes - the number of idle + active processes;
|
||||
; max active processes - the maximum number of active processes since FPM
|
||||
; has started;
|
||||
; max children reached - number of times, the process limit has been reached,
|
||||
; when pm tries to start more children (works only for
|
||||
; pm 'dynamic' and 'ondemand');
|
||||
; Value are updated in real time.
|
||||
; Example output:
|
||||
; pool: www
|
||||
; process manager: static
|
||||
; start time: 01/Jul/2011:17:53:49 +0200
|
||||
; start since: 62636
|
||||
; accepted conn: 190460
|
||||
; listen queue: 0
|
||||
; max listen queue: 1
|
||||
; listen queue len: 42
|
||||
; idle processes: 4
|
||||
; active processes: 11
|
||||
; total processes: 15
|
||||
; max active processes: 12
|
||||
; max children reached: 0
|
||||
;
|
||||
; By default the status page output is formatted as text/plain. Passing either
|
||||
; 'html', 'xml' or 'json' in the query string will return the corresponding
|
||||
; output syntax. Example:
|
||||
; http://www.foo.bar/status
|
||||
; http://www.foo.bar/status?json
|
||||
; http://www.foo.bar/status?html
|
||||
; http://www.foo.bar/status?xml
|
||||
;
|
||||
; By default the status page only outputs short status. Passing 'full' in the
|
||||
; query string will also return status for each pool process.
|
||||
; Example:
|
||||
; http://www.foo.bar/status?full
|
||||
; http://www.foo.bar/status?json&full
|
||||
; http://www.foo.bar/status?html&full
|
||||
; http://www.foo.bar/status?xml&full
|
||||
; The Full status returns for each process:
|
||||
; pid - the PID of the process;
|
||||
; state - the state of the process (Idle, Running, ...);
|
||||
; start time - the date and time the process has started;
|
||||
; start since - the number of seconds since the process has started;
|
||||
; requests - the number of requests the process has served;
|
||||
; request duration - the duration in µs of the requests;
|
||||
; request method - the request method (GET, POST, ...);
|
||||
; request URI - the request URI with the query string;
|
||||
; content length - the content length of the request (only with POST);
|
||||
; user - the user (PHP_AUTH_USER) (or '-' if not set);
|
||||
; script - the main script called (or '-' if not set);
|
||||
; last request cpu - the %cpu the last request consumed
|
||||
; it's always 0 if the process is not in Idle state
|
||||
; because CPU calculation is done when the request
|
||||
; processing has terminated;
|
||||
; last request memory - the max amount of memory the last request consumed
|
||||
; it's always 0 if the process is not in Idle state
|
||||
; because memory calculation is done when the request
|
||||
; processing has terminated;
|
||||
; If the process is in Idle state, then informations are related to the
|
||||
; last request the process has served. Otherwise informations are related to
|
||||
; the current request being served.
|
||||
; Example output:
|
||||
; ************************
|
||||
; pid: 31330
|
||||
; state: Running
|
||||
; start time: 01/Jul/2011:17:53:49 +0200
|
||||
; start since: 63087
|
||||
; requests: 12808
|
||||
; request duration: 1250261
|
||||
; request method: GET
|
||||
; request URI: /test_mem.php?N=10000
|
||||
; content length: 0
|
||||
; user: -
|
||||
; script: /home/fat/web/docs/php/test_mem.php
|
||||
; last request cpu: 0.00
|
||||
; last request memory: 0
|
||||
;
|
||||
; Note: There is a real-time FPM status monitoring sample web page available
|
||||
; It's available in: /usr/local/share/php/fpm/status.html
|
||||
;
|
||||
; Note: The value must start with a leading slash (/). The value can be
|
||||
; anything, but it may not be a good idea to use the .php extension or it
|
||||
; may conflict with a real PHP file.
|
||||
; Default Value: not set
|
||||
;pm.status_path = /status
|
||||
|
||||
; The ping URI to call the monitoring page of FPM. If this value is not set, no
|
||||
; URI will be recognized as a ping page. This could be used to test from outside
|
||||
; that FPM is alive and responding, or to
|
||||
; - create a graph of FPM availability (rrd or such);
|
||||
; - remove a server from a group if it is not responding (load balancing);
|
||||
; - trigger alerts for the operating team (24/7).
|
||||
; Note: The value must start with a leading slash (/). The value can be
|
||||
; anything, but it may not be a good idea to use the .php extension or it
|
||||
; may conflict with a real PHP file.
|
||||
; Default Value: not set
|
||||
;ping.path = /ping
|
||||
|
||||
; This directive may be used to customize the response of a ping request. The
|
||||
; response is formatted as text/plain with a 200 response code.
|
||||
; Default Value: pong
|
||||
;ping.response = pong
|
||||
|
||||
; The access log file
|
||||
; Default: not set
|
||||
;access.log = log/$pool.access.log
|
||||
|
||||
; The access log format.
|
||||
; The following syntax is allowed
|
||||
; %%: the '%' character
|
||||
; %C: %CPU used by the request
|
||||
; it can accept the following format:
|
||||
; - %{user}C for user CPU only
|
||||
; - %{system}C for system CPU only
|
||||
; - %{total}C for user + system CPU (default)
|
||||
; %d: time taken to serve the request
|
||||
; it can accept the following format:
|
||||
; - %{seconds}d (default)
|
||||
; - %{miliseconds}d
|
||||
; - %{mili}d
|
||||
; - %{microseconds}d
|
||||
; - %{micro}d
|
||||
; %e: an environment variable (same as $_ENV or $_SERVER)
|
||||
; it must be associated with embraces to specify the name of the env
|
||||
; variable. Some exemples:
|
||||
; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e
|
||||
; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e
|
||||
; %f: script filename
|
||||
; %l: content-length of the request (for POST request only)
|
||||
; %m: request method
|
||||
; %M: peak of memory allocated by PHP
|
||||
; it can accept the following format:
|
||||
; - %{bytes}M (default)
|
||||
; - %{kilobytes}M
|
||||
; - %{kilo}M
|
||||
; - %{megabytes}M
|
||||
; - %{mega}M
|
||||
; %n: pool name
|
||||
; %o: output header
|
||||
; it must be associated with embraces to specify the name of the header:
|
||||
; - %{Content-Type}o
|
||||
; - %{X-Powered-By}o
|
||||
; - %{Transfert-Encoding}o
|
||||
; - ....
|
||||
; %p: PID of the child that serviced the request
|
||||
; %P: PID of the parent of the child that serviced the request
|
||||
; %q: the query string
|
||||
; %Q: the '?' character if query string exists
|
||||
; %r: the request URI (without the query string, see %q and %Q)
|
||||
; %R: remote IP address
|
||||
; %s: status (response code)
|
||||
; %t: server time the request was received
|
||||
; it can accept a strftime(3) format:
|
||||
; %d/%b/%Y:%H:%M:%S %z (default)
|
||||
; The strftime(3) format must be encapsuled in a %{<strftime_format>}t tag
|
||||
; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t
|
||||
; %T: time the log has been written (the request has finished)
|
||||
; it can accept a strftime(3) format:
|
||||
; %d/%b/%Y:%H:%M:%S %z (default)
|
||||
; The strftime(3) format must be encapsuled in a %{<strftime_format>}t tag
|
||||
; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t
|
||||
; %u: remote user
|
||||
;
|
||||
; Default: "%R - %u %t \"%m %r\" %s"
|
||||
;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%"
|
||||
|
||||
; The log file for slow requests
|
||||
; Default Value: not set
|
||||
; Note: slowlog is mandatory if request_slowlog_timeout is set
|
||||
slowlog = /var/log/php/fpm.slow.log
|
||||
|
||||
; The timeout for serving a single request after which a PHP backtrace will be
|
||||
; dumped to the 'slowlog' file. A value of '0s' means 'off'.
|
||||
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
|
||||
; Default Value: 0
|
||||
request_slowlog_timeout = 3
|
||||
|
||||
; Depth of slow log stack trace.
|
||||
; Default Value: 20
|
||||
;request_slowlog_trace_depth = 20
|
||||
|
||||
; The timeout for serving a single request after which the worker process will
|
||||
; be killed. This option should be used when the 'max_execution_time' ini option
|
||||
; does not stop script execution for some reason. A value of '0' means 'off'.
|
||||
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
|
||||
; Default Value: 0
|
||||
;request_terminate_timeout = 0
|
||||
|
||||
; Set open file descriptor rlimit.
|
||||
; Default Value: system defined value
|
||||
;rlimit_files = 1024
|
||||
|
||||
; Set max core size rlimit.
|
||||
; Possible Values: 'unlimited' or an integer greater or equal to 0
|
||||
; Default Value: system defined value
|
||||
;rlimit_core = 0
|
||||
|
||||
; Chroot to this directory at the start. This value must be defined as an
|
||||
; absolute path. When this value is not set, chroot is not used.
|
||||
; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
|
||||
; of its subdirectories. If the pool prefix is not set, the global prefix
|
||||
; will be used instead.
|
||||
; Note: chrooting is a great security feature and should be used whenever
|
||||
; possible. However, all PHP paths will be relative to the chroot
|
||||
; (error_log, sessions.save_path, ...).
|
||||
; Default Value: not set
|
||||
;chroot =
|
||||
|
||||
; Chdir to this directory at the start.
|
||||
; Note: relative path can be used.
|
||||
; Default Value: current directory or / when chroot
|
||||
;chdir = /var/www
|
||||
|
||||
; Redirect worker stdout and stderr into main error log. If not set, stdout and
|
||||
; stderr will be redirected to /dev/null according to FastCGI specs.
|
||||
; Note: on highloaded environement, this can cause some delay in the page
|
||||
; process time (several ms).
|
||||
; Default Value: no
|
||||
catch_workers_output = yes
|
||||
|
||||
; Clear environment in FPM workers
|
||||
; Prevents arbitrary environment variables from reaching FPM worker processes
|
||||
; by clearing the environment in workers before env vars specified in this
|
||||
; pool configuration are added.
|
||||
; Setting to "no" will make all environment variables available to PHP code
|
||||
; via getenv(), $_ENV and $_SERVER.
|
||||
; Default Value: yes
|
||||
;clear_env = no
|
||||
|
||||
; Limits the extensions of the main script FPM will allow to parse. This can
|
||||
; prevent configuration mistakes on the web server side. You should only limit
|
||||
; FPM to .php extensions to prevent malicious users to use other extensions to
|
||||
; execute php code.
|
||||
; Note: set an empty value to allow all extensions.
|
||||
; Default Value: .php
|
||||
;security.limit_extensions = .php .php3 .php4 .php5 .php7
|
||||
|
||||
; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
|
||||
; the current environment.
|
||||
; Default Value: clean env
|
||||
;env[HOSTNAME] = $HOSTNAME
|
||||
;env[PATH] = /usr/local/bin:/usr/bin:/bin
|
||||
;env[TMP] = /tmp
|
||||
;env[TMPDIR] = /tmp
|
||||
;env[TEMP] = /tmp
|
||||
|
||||
; Additional php.ini defines, specific to this pool of workers. These settings
|
||||
; overwrite the values previously defined in the php.ini. The directives are the
|
||||
; same as the PHP SAPI:
|
||||
; php_value/php_flag - you can set classic ini defines which can
|
||||
; be overwritten from PHP call 'ini_set'.
|
||||
; php_admin_value/php_admin_flag - these directives won't be overwritten by
|
||||
; PHP call 'ini_set'
|
||||
; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
|
||||
|
||||
; Defining 'extension' will load the corresponding shared extension from
|
||||
; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
|
||||
; overwrite previously defined php.ini values, but will append the new value
|
||||
; instead.
|
||||
|
||||
; Note: path INI options can be relative and will be expanded with the prefix
|
||||
; (pool, global or /usr/local)
|
||||
|
||||
; Default Value: nothing is defined by default except the values in php.ini and
|
||||
; specified at startup with the -d argument
|
||||
;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
|
||||
;php_flag[display_errors] = off
|
||||
;php_admin_value[error_log] = /var/log/fpm-php.www.log
|
||||
;php_admin_flag[log_errors] = on
|
||||
;php_admin_value[memory_limit] = 32M
|
||||
1933
php/5/conf/php.ini
Normal file
1933
php/5/conf/php.ini
Normal file
File diff suppressed because it is too large
Load Diff
99
php/5/data.yml
Executable file
99
php/5/data.yml
Executable file
@ -0,0 +1,99 @@
|
||||
additionalProperties:
|
||||
formFields:
|
||||
- type: select
|
||||
multiple: true
|
||||
labelZh: 默认扩展
|
||||
labelEn: Extensions
|
||||
allowCreate: true
|
||||
default:
|
||||
- mysqli
|
||||
values:
|
||||
- label: opcache
|
||||
value: opcache
|
||||
- label: memcached
|
||||
value: memcached
|
||||
- label: memcache
|
||||
value: memcache
|
||||
- label: redis
|
||||
value: redis
|
||||
- label: mcrypt
|
||||
value: mcrypt
|
||||
- label: xdebug
|
||||
value: xdebug
|
||||
- label: imap
|
||||
value: imap
|
||||
- label: exif
|
||||
value: exif
|
||||
- label: intl
|
||||
value: intl
|
||||
- label: swoole
|
||||
value: swoole
|
||||
- label: yaf
|
||||
value: yaf
|
||||
- label: pgsql
|
||||
value: pgsql
|
||||
- label: pdo_pgsql
|
||||
value: pdo_pgsql
|
||||
- label: snmp
|
||||
value: snmp
|
||||
- label: ldap
|
||||
value: ldap
|
||||
- label: pspell
|
||||
value: pspell
|
||||
- label: bz2
|
||||
value: bz2
|
||||
- label: sysvshm
|
||||
value: sysvshm
|
||||
- label: calendar
|
||||
value: calendar
|
||||
- label: gmp
|
||||
value: gmp
|
||||
- label: sysvmsg
|
||||
value: sysvmsg
|
||||
- label: igbinary
|
||||
value: igbinary
|
||||
- label: mysqli
|
||||
value: mysqli
|
||||
- label: pdo_mysql
|
||||
value: pdo_mysql
|
||||
- label: mbstring
|
||||
value: mbstring
|
||||
- label: gd
|
||||
value: gd
|
||||
- label: ioncube_loader
|
||||
value: ioncube_loader
|
||||
- label: curl
|
||||
value: curl
|
||||
- label: sg15
|
||||
value: sourceguardian
|
||||
- label: sg11
|
||||
value: sourceguardian
|
||||
- label: imagick
|
||||
value: imagick
|
||||
envKey: PHP_EXTENSIONS
|
||||
- default: 5.6.40
|
||||
envKey: PHP_VERSION
|
||||
labelEn: PHP Version
|
||||
labelZh: PHP 版本
|
||||
required: true
|
||||
type: select
|
||||
values:
|
||||
- label: "5.6.40"
|
||||
value: "5.6.40"
|
||||
- default: https://mirrors.tuna.tsinghua.edu.cn
|
||||
envKey: CONTAINER_PACKAGE_URL
|
||||
labelEn: Package Source
|
||||
labelZh: 扩展源
|
||||
required: true
|
||||
type: select
|
||||
values:
|
||||
- label: "https://mirrors.tuna.tsinghua.edu.cn"
|
||||
value: "https://mirrors.tuna.tsinghua.edu.cn"
|
||||
- default: 9000
|
||||
envKey: PANEL_APP_PORT_HTTP
|
||||
labelEn: PHP-FPM Port
|
||||
labelZh: PHP-FPM 端口
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
|
||||
34
php/5/docker-compose.yml
Normal file
34
php/5/docker-compose.yml
Normal file
@ -0,0 +1,34 @@
|
||||
services:
|
||||
php:
|
||||
build:
|
||||
context: ./build
|
||||
args:
|
||||
PHP_IMAGE: 1panel/php:${PHP_VERSION}-fpm
|
||||
CONTAINER_PACKAGE_URL: ${CONTAINER_PACKAGE_URL}
|
||||
PHP_EXTENSIONS: ${PHP_EXTENSIONS}
|
||||
TZ: ${TZ}
|
||||
image: ${IMAGE_NAME}
|
||||
container_name: ${CONTAINER_NAME}
|
||||
restart: always
|
||||
networks:
|
||||
- 1panel-network
|
||||
volumes:
|
||||
- ${PANEL_WEBSITE_DIR}:/www/
|
||||
- ./conf:/usr/local/etc/php
|
||||
- ./conf/conf.d:/usr/local/etc/php/conf.d
|
||||
- ./conf/php-fpm.conf:/usr/local/etc/php-fpm.d/www.conf
|
||||
- ./log:/var/log/php
|
||||
- ./extensions:${EXTENSION_DIR}
|
||||
- ./supervisor/supervisord.conf:/etc/supervisord.conf
|
||||
- ./supervisor/supervisor.d/php-fpm.ini:/etc/supervisor.d/php-fpm.ini
|
||||
- ./supervisor/supervisor.d:/etc/supervisor.d
|
||||
- ./supervisor/log:/var/log/supervisor
|
||||
ports:
|
||||
- 127.0.0.1:${PANEL_APP_PORT_HTTP}:9000
|
||||
labels:
|
||||
createdBy: "Apps"
|
||||
cap_add:
|
||||
- SYS_PTRACE
|
||||
networks:
|
||||
1panel-network:
|
||||
external: true
|
||||
11
php/5/supervisor/supervisor.d/php-fpm.ini
Normal file
11
php/5/supervisor/supervisor.d/php-fpm.ini
Normal file
@ -0,0 +1,11 @@
|
||||
[program:php-fpm]
|
||||
command=php-fpm
|
||||
process_name=%(program_name)s_%(process_num)02d
|
||||
user=root
|
||||
numprocs=1
|
||||
autostart=true
|
||||
autorestart=false
|
||||
startsecs=0
|
||||
redirect_stderr=true
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
155
php/5/supervisor/supervisord.conf
Normal file
155
php/5/supervisor/supervisord.conf
Normal file
@ -0,0 +1,155 @@
|
||||
; Sample supervisor config file.
|
||||
;
|
||||
; For more information on the config file, please see:
|
||||
; http://supervisord.org/configuration.html
|
||||
;
|
||||
; Notes:
|
||||
; - Shell expansion ("~" or "$HOME") is not supported. Environment
|
||||
; variables can be expanded using this syntax: "%(ENV_HOME)s".
|
||||
; - Quotes around values are not supported, except in the case of
|
||||
; the environment= options as shown below.
|
||||
; - Comments must have a leading space: "a=b ;comment" not "a=b;comment".
|
||||
; - Command will be truncated if it looks like a config file comment, e.g.
|
||||
; "command=bash -c 'foo ; bar'" will truncate to "command=bash -c 'foo ".
|
||||
[unix_http_server]
|
||||
; the path to the socket file
|
||||
file = /run/supervisor.sock
|
||||
|
||||
; chmod=0700 ; socket file mode (default 0700)
|
||||
; chown=nobody:nogroup ; socket file uid:gid owner
|
||||
; username=user ; default is no username (open server)
|
||||
; password=123 ; default is no password (open server)
|
||||
; inet (TCP) server disabled by default
|
||||
[inet_http_server]
|
||||
; ip_address:port specifier, *:port for all iface
|
||||
port = 127.0.0.1:9002
|
||||
|
||||
; username=user ; default is no username (open server)
|
||||
; password=123 ; default is no password (open server)
|
||||
[supervisord]
|
||||
; main log file; default $CWD/supervisord.log
|
||||
logfile = /var/log/supervisord.log
|
||||
; max main logfile bytes b4 rotation; default 50MB
|
||||
logfile_maxbytes = 50MB
|
||||
; # of main logfile backups; 0 means none, default 11
|
||||
logfile_backups = 10
|
||||
; log level; default info; others: debug,warn,trace
|
||||
loglevel = info
|
||||
; supervisord pidfile; default supervisord.pid
|
||||
pidfile = /run/supervisord.pid
|
||||
; start in foreground if true; default false
|
||||
nodaemon = true
|
||||
; min. avail startup file descriptors; default 1024
|
||||
minfds = 1024
|
||||
; min. avail process descriptors;default 200
|
||||
minprocs = 200
|
||||
; umask=022 ; process file creation umask; default 022
|
||||
; user=supervisord ; setuid to this UNIX account at startup; recommended if root
|
||||
; identifier=supervisor ; supervisord identifier, default is 'supervisor'
|
||||
; directory=/tmp ; default is not to cd during start
|
||||
; nocleanup=true ; don't clean up tempfiles at start; default false
|
||||
; 'AUTO' child log dir, default $TEMP
|
||||
childlogdir = /var/log/supervisor
|
||||
|
||||
; environment=KEY="value" ; key value pairs to add to environment
|
||||
; strip_ansi=false ; strip ansi escape codes in logs; def. false
|
||||
; The rpcinterface:supervisor section must remain in the config file for
|
||||
; RPC (supervisorctl/web interface) to work. Additional interfaces may be
|
||||
; added by defining them in separate [rpcinterface:x] sections.
|
||||
[rpcinterface:supervisor]
|
||||
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
||||
|
||||
; The supervisorctl section configures how supervisorctl will connect to
|
||||
; supervisord. configure it match the settings in either the unix_http_server
|
||||
; or inet_http_server section.
|
||||
[supervisorctl]
|
||||
; use a unix:// URL for a unix socket
|
||||
serverurl = unix:///run/supervisor.sock
|
||||
|
||||
; serverurl=http://127.0.0.1:9001 ; use an http:// url to specify an inet socket
|
||||
; username=chris ; should be same as in [*_http_server] if set
|
||||
; password=123 ; should be same as in [*_http_server] if set
|
||||
; prompt=mysupervisor ; cmd line prompt (default "supervisor")
|
||||
; history_file=~/.sc_history ; use readline history if available
|
||||
; The sample program section below shows all possible program subsection values.
|
||||
; Create one or more 'real' program: sections to be able to control them under
|
||||
; supervisor.
|
||||
; [program:theprogramname]
|
||||
; command=/bin/cat ; the program (relative uses PATH, can take args)
|
||||
; process_name=%(program_name)s ; process_name expr (default %(program_name)s)
|
||||
; numprocs=1 ; number of processes copies to start (def 1)
|
||||
; directory=/tmp ; directory to cwd to before exec (def no cwd)
|
||||
; umask=022 ; umask for process (default None)
|
||||
; priority=999 ; the relative start priority (default 999)
|
||||
; autostart=true ; start at supervisord start (default: true)
|
||||
; startsecs=1 ; # of secs prog must stay up to be running (def. 1)
|
||||
; startretries=3 ; max # of serial start failures when starting (default 3)
|
||||
; autorestart=unexpected ; when to restart if exited after running (def: unexpected)
|
||||
; exitcodes=0 ; 'expected' exit codes used with autorestart (default 0)
|
||||
; stopsignal=QUIT ; signal used to kill process (default TERM)
|
||||
; stopwaitsecs=10 ; max num secs to wait b4 SIGKILL (default 10)
|
||||
; stopasgroup=false ; send stop signal to the UNIX process group (default false)
|
||||
; killasgroup=false ; SIGKILL the UNIX process group (def false)
|
||||
; user=chrism ; setuid to this UNIX account to run the program
|
||||
; redirect_stderr=true ; redirect proc stderr to stdout (default false)
|
||||
; stdout_logfile=/a/path ; stdout log path, NONE for none; default AUTO
|
||||
; stdout_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
|
||||
; stdout_logfile_backups=10 ; # of stdout logfile backups (0 means none, default 10)
|
||||
; stdout_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
|
||||
; stdout_events_enabled=false ; emit events on stdout writes (default false)
|
||||
; stdout_syslog=false ; send stdout to syslog with process name (default false)
|
||||
; stderr_logfile=/a/path ; stderr log path, NONE for none; default AUTO
|
||||
; stderr_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
|
||||
; stderr_logfile_backups=10 ; # of stderr logfile backups (0 means none, default 10)
|
||||
; stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
|
||||
; stderr_events_enabled=false ; emit events on stderr writes (default false)
|
||||
; stderr_syslog=false ; send stderr to syslog with process name (default false)
|
||||
; environment=A="1",B="2" ; process environment additions (def no adds)
|
||||
; serverurl=AUTO ; override serverurl computation (childutils)
|
||||
; The sample eventlistener section below shows all possible eventlistener
|
||||
; subsection values. Create one or more 'real' eventlistener: sections to be
|
||||
; able to handle event notifications sent by supervisord.
|
||||
; [eventlistener:theeventlistenername]
|
||||
; command=/bin/eventlistener ; the program (relative uses PATH, can take args)
|
||||
; process_name=%(program_name)s ; process_name expr (default %(program_name)s)
|
||||
; numprocs=1 ; number of processes copies to start (def 1)
|
||||
; events=EVENT ; event notif. types to subscribe to (req'd)
|
||||
; buffer_size=10 ; event buffer queue size (default 10)
|
||||
; directory=/tmp ; directory to cwd to before exec (def no cwd)
|
||||
; umask=022 ; umask for process (default None)
|
||||
; priority=-1 ; the relative start priority (default -1)
|
||||
; autostart=true ; start at supervisord start (default: true)
|
||||
; startsecs=1 ; # of secs prog must stay up to be running (def. 1)
|
||||
; startretries=3 ; max # of serial start failures when starting (default 3)
|
||||
; autorestart=unexpected ; autorestart if exited after running (def: unexpected)
|
||||
; exitcodes=0 ; 'expected' exit codes used with autorestart (default 0)
|
||||
; stopsignal=QUIT ; signal used to kill process (default TERM)
|
||||
; stopwaitsecs=10 ; max num secs to wait b4 SIGKILL (default 10)
|
||||
; stopasgroup=false ; send stop signal to the UNIX process group (default false)
|
||||
; killasgroup=false ; SIGKILL the UNIX process group (def false)
|
||||
; user=chrism ; setuid to this UNIX account to run the program
|
||||
; redirect_stderr=false ; redirect_stderr=true is not allowed for eventlisteners
|
||||
; stdout_logfile=/a/path ; stdout log path, NONE for none; default AUTO
|
||||
; stdout_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
|
||||
; stdout_logfile_backups=10 ; # of stdout logfile backups (0 means none, default 10)
|
||||
; stdout_events_enabled=false ; emit events on stdout writes (default false)
|
||||
; stdout_syslog=false ; send stdout to syslog with process name (default false)
|
||||
; stderr_logfile=/a/path ; stderr log path, NONE for none; default AUTO
|
||||
; stderr_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
|
||||
; stderr_logfile_backups=10 ; # of stderr logfile backups (0 means none, default 10)
|
||||
; stderr_events_enabled=false ; emit events on stderr writes (default false)
|
||||
; stderr_syslog=false ; send stderr to syslog with process name (default false)
|
||||
; environment=A="1",B="2" ; process environment additions
|
||||
; serverurl=AUTO ; override serverurl computation (childutils)
|
||||
; The sample group section below shows all possible group values. Create one
|
||||
; or more 'real' group: sections to create "heterogeneous" process groups.
|
||||
; [group:thegroupname]
|
||||
; programs=progname1,progname2 ; each refers to 'x' in [program:x] definitions
|
||||
; priority=999 ; the relative start priority (default 999)
|
||||
; The [include] section can just contain the "files" setting. This
|
||||
; setting can list multiple files (separated by whitespace or
|
||||
; newlines). It can also contain wildcards. The filenames are
|
||||
; interpreted as relative to this file. Included files *cannot*
|
||||
; include files themselves.
|
||||
[include]
|
||||
files = /etc/supervisor.d/*.ini
|
||||
6
php/7/.env
Normal file
6
php/7/.env
Normal file
@ -0,0 +1,6 @@
|
||||
PHP_VERSION=
|
||||
CONTAINER_PACKAGE_URL=
|
||||
PHP_EXTENSIONS=
|
||||
IMAGE_NAME=
|
||||
TZ="Asia/Shanghai"
|
||||
EXTENSION_DIR="/usr/local/lib/php/extensions/no-debug-non-zts-20230831"
|
||||
24
php/7/build/Dockerfile
Normal file
24
php/7/build/Dockerfile
Normal file
@ -0,0 +1,24 @@
|
||||
ARG PHP_IMAGE
|
||||
FROM ${PHP_IMAGE}
|
||||
|
||||
ARG PHP_EXTENSIONS
|
||||
ARG CONTAINER_PACKAGE_URL
|
||||
|
||||
RUN sed -i "s|URIs: http://deb.debian.org/debian|URIs: ${CONTAINER_PACKAGE_URL}/debian|g" /etc/apt/sources.list.d/debian.sources && \
|
||||
cat /etc/apt/sources.list.d/debian.sources && \
|
||||
apt-get update
|
||||
|
||||
COPY data/install-ext /usr/local/bin/
|
||||
RUN chmod uga+x /usr/local/bin/install-ext
|
||||
|
||||
ENV PHP_INI_SCAN_DIR=/usr/local/etc/php/conf.d
|
||||
|
||||
RUN install-ext ${PHP_EXTENSIONS}
|
||||
|
||||
RUN pear config-set php_ini /usr/local/etc/php/php.ini
|
||||
|
||||
RUN usermod -u 1000 www-data && groupmod -g 1000 www-data
|
||||
|
||||
ENTRYPOINT ["supervisord", "--nodaemon", "--configuration", "/etc/supervisord.conf"]
|
||||
|
||||
WORKDIR /www
|
||||
303
php/7/build/data/install-ext
Normal file
303
php/7/build/data/install-ext
Normal file
@ -0,0 +1,303 @@
|
||||
#!/bin/bash
|
||||
|
||||
export MC="-j$(nproc)"
|
||||
|
||||
echo
|
||||
echo "============================================"
|
||||
echo "PHP version : ${PHP_VERSION}"
|
||||
echo "Install extensions : $1"
|
||||
echo "============================================"
|
||||
echo
|
||||
|
||||
isPhpVersionGreaterOrEqual() {
|
||||
local PHP_MAJOR_VERSION=$(php -r "echo PHP_MAJOR_VERSION;")
|
||||
local PHP_MINOR_VERSION=$(php -r "echo PHP_MINOR_VERSION;")
|
||||
|
||||
if [ "$PHP_MAJOR_VERSION" -gt "$1" ] || [ "$PHP_MAJOR_VERSION" -eq "$1" ] && [ "$PHP_MINOR_VERSION" -ge "$2" ]; then
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
is_extension_installed() {
|
||||
local extension=$1
|
||||
if php -m | grep -q "^$extension$"; then
|
||||
echo "------ $extension is already installed ------"
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
install_php_extensions() {
|
||||
local extension=$1
|
||||
install-php-extensions $extension
|
||||
|
||||
if is_extension_installed "$extension"; then
|
||||
echo "------ install-php-extensions $extension succeeded ------"
|
||||
return
|
||||
fi
|
||||
|
||||
echo "------ install-php-extensions $extension failed ------"
|
||||
}
|
||||
|
||||
pecl_install() {
|
||||
local extension=$1
|
||||
printf "\n" | pecl install $extension
|
||||
docker-php-ext-enable $extension
|
||||
if is_extension_installed "$extension"; then
|
||||
echo "------ pecl install $extension succeeded ------"
|
||||
return
|
||||
fi
|
||||
echo "------ pecl install $extension failed ------"
|
||||
}
|
||||
|
||||
docker_php_ext_install() {
|
||||
local extension=$1
|
||||
docker-php-ext-install $extension
|
||||
if is_extension_installed "$extension"; then
|
||||
echo "------ docker-php-ext-install install $extension succeeded ------"
|
||||
return
|
||||
fi
|
||||
echo "------ docker-php-ext-install install $extension failed------"
|
||||
}
|
||||
|
||||
install_extension_default() {
|
||||
local extension=$1
|
||||
printf "\n" | pecl install $extension
|
||||
if [ $? -eq 0 ]; then
|
||||
docker-php-ext-enable $extension
|
||||
echo "------ pecl install $extension succeeded ------"
|
||||
else
|
||||
echo "------ pecl install $extension failed use docker-php-ext-install------"
|
||||
docker-php-ext-install ${MC} $extension
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "------ docker-php-ext-install install $extension succeeded ------"
|
||||
else
|
||||
echo "------ docker-php-ext-install install $extension failed use install-php-extensions------"
|
||||
install-php-extensions $extension
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "------ install-php-extensions $extension succeeded ------"
|
||||
else
|
||||
echo "------ install-php-extensions $extension failed ------"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
install_gd() {
|
||||
isPhpVersionGreaterOrEqual 8 0
|
||||
if [ "$?" = "1" ]; then
|
||||
# "--with-xxx-dir" was removed from php 7.4,
|
||||
# issue: https://github.com/docker-library/php/issues/912
|
||||
options="--with-freetype --with-jpeg --with-webp"
|
||||
else
|
||||
options="--with-gd --with-freetype-dir=/usr/include/ --with-png-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-webp-dir=/usr/include/"
|
||||
fi
|
||||
apt-get install -y \
|
||||
libfreetype6 \
|
||||
libfreetype6-dev \
|
||||
libpng-dev \
|
||||
libwebp-dev \
|
||||
libjpeg-dev \
|
||||
&& docker-php-ext-configure gd ${options} \
|
||||
&& docker-php-ext-install ${MC} gd \
|
||||
&& apt-get purge -y \
|
||||
libfreetype6-dev \
|
||||
libpng-dev \
|
||||
&& apt-get autoremove -y
|
||||
}
|
||||
|
||||
|
||||
install_msg() {
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "------ install $1 succeeded ------"
|
||||
else
|
||||
echo "------ install $1 failed ------"
|
||||
fi
|
||||
}
|
||||
|
||||
install_memcache() {
|
||||
printf "\n" | pecl install memcache
|
||||
install_msg memcache
|
||||
docker-php-ext-enable memcache
|
||||
}
|
||||
|
||||
install_pdo_pgsql() {
|
||||
apt-get update && apt-get install -y libpq-dev
|
||||
install_msg pdo_pgsql
|
||||
docker-php-ext-install pdo_pgsql
|
||||
}
|
||||
|
||||
install_pdo_mysql() {
|
||||
docker-php-ext-install pdo_mysql
|
||||
install_msg pdo_mysql
|
||||
}
|
||||
|
||||
install_yaf() {
|
||||
pecl install yaf
|
||||
install_msg yaf
|
||||
docker-php-ext-enable yaf
|
||||
}
|
||||
|
||||
install_extension() {
|
||||
local extension=$1
|
||||
if is_extension_installed "$extension"; then
|
||||
return
|
||||
fi
|
||||
|
||||
echo "------ install extension: $extension ------"
|
||||
|
||||
if [ "$extension" = "gd" ]; then
|
||||
install_gd
|
||||
elif [ "$extension" = "memcache" ]; then
|
||||
install_memcache
|
||||
elif [ "$extension" = "yaf" ]; then
|
||||
install_yaf
|
||||
elif [ "$extension" = "pdo_pgsql" ]; then
|
||||
install_pdo_pgsql
|
||||
elif [ "$extension" = "pdo_mysql" ]; then
|
||||
install_pdo_mysql
|
||||
elif [ "$extension" = "yaml" ]; then
|
||||
apt-get install -y libyaml-dev
|
||||
pecl_install yaml
|
||||
elif [ "$extension" = "mongodb" ]; then
|
||||
apt-get install -y libssl-dev
|
||||
pecl_install mongodb
|
||||
elif [ "$extension" = "mcrypt" ]; then
|
||||
apt-get install -y libmcrypt-dev
|
||||
pecl_install mcrypt
|
||||
elif [ "$extension" = "ssh2" ]; then
|
||||
apt-get install -y libssh2-1-dev libssh2-1
|
||||
pecl_install ssh2
|
||||
elif [ "$extension" = "rdkafka" ]; then
|
||||
apt-get install -y librdkafka-dev
|
||||
pecl_install rdkafka
|
||||
elif [ "$extension" = "varnish" ]; then
|
||||
apt-get install -y libvarnishapi-dev
|
||||
pecl_install varnish
|
||||
elif [ "$extension" = "bcmath" ]; then
|
||||
docker_php_ext_install bcmath
|
||||
elif [ "$extension" = "pcntl" ]; then
|
||||
docker_php_ext_install pcntl
|
||||
elif [ "$extension" = "shmop" ]; then
|
||||
docker_php_ext_install shmop
|
||||
elif [ "$extension" = "gettext" ]; then
|
||||
docker_php_ext_install gettext
|
||||
elif [ "$extension" = "sockets" ]; then
|
||||
docker_php_ext_install sockets
|
||||
elif [ "$extension" = "sysvsem" ]; then
|
||||
docker_php_ext_install sysvsem
|
||||
elif [ "$extension" = "sysvmsg" ]; then
|
||||
docker_php_ext_install sysvmsg
|
||||
elif [ "$extension" = "opcache" ]; then
|
||||
docker_php_ext_install opcache
|
||||
elif [ "$extension" = "mysqli" ]; then
|
||||
docker_php_ext_install mysqli
|
||||
elif [ "$extension" = "sysvshm" ]; then
|
||||
docker_php_ext_install sysvshm
|
||||
elif [ "$extension" = "calendar" ]; then
|
||||
docker_php_ext_install calendar
|
||||
elif [ "$extension" = "zmq" ]; then
|
||||
docker_php_ext_install zmq
|
||||
elif [ "$extension" = "sodium" ]; then
|
||||
apt-get install -y libsodium-dev
|
||||
docker_php_ext_install sodium
|
||||
elif [ "$extension" = "zip" ]; then
|
||||
apt-get update && apt-get install -y libzip-dev
|
||||
docker_php_ext_install zip
|
||||
elif [ "$extension" = "memcached" ]; then
|
||||
install_php_extensions memcached
|
||||
elif [ "$extension" = "redis" ]; then
|
||||
install_php_extensions redis
|
||||
elif [ "$extension" = "xdebug" ]; then
|
||||
install_php_extensions xdebug
|
||||
elif [ "$extension" = "imap" ]; then
|
||||
install_php_extensions imap
|
||||
elif [ "$extension" = "intl" ]; then
|
||||
install_php_extensions intl
|
||||
elif [ "$extension" = "swoole" ]; then
|
||||
install_php_extensions swoole
|
||||
elif [ "$extension" = "pgsql" ]; then
|
||||
install_php_extensions pgsql
|
||||
elif [ "$extension" = "curl" ]; then
|
||||
install_php_extensions curl
|
||||
elif [ "$extension" = "sourceguardian" ]; then
|
||||
install_php_extensions sourceguardian
|
||||
elif [ "$extension" = "snmp" ]; then
|
||||
install_php_extensions snmp
|
||||
elif [ "$extension" = "mbstring" ]; then
|
||||
install_php_extensions mbstring
|
||||
elif [ "$extension" = "pdo_firebird" ]; then
|
||||
install_php_extensions pdo_firebird
|
||||
elif [ "$extension" = "pdo_dblib" ]; then
|
||||
install_php_extensions pdo_dblib
|
||||
elif [ "$extension" = "pdo_oci" ]; then
|
||||
install_php_extensions pdo_oci
|
||||
elif [ "$extension" = "pdo_odbc" ]; then
|
||||
install_php_extensions pdo_odbc
|
||||
elif [ "$extension" = "oci8" ]; then
|
||||
install_php_extensions oci8
|
||||
elif [ "$extension" = "odbc" ]; then
|
||||
install_php_extensions odbc
|
||||
elif [ "$extension" = "soap" ]; then
|
||||
install_php_extensions soap
|
||||
elif [ "$extension" = "xsl" ]; then
|
||||
install_php_extensions xsl
|
||||
elif [ "$extension" = "xmlrpc" ]; then
|
||||
install_php_extensions xmlrpc
|
||||
elif [ "$extension" = "readline" ]; then
|
||||
install_php_extensions readline
|
||||
elif [ "$extension" = "snmp" ]; then
|
||||
install_php_extensions snmp
|
||||
elif [ "$extension" = "tidy" ]; then
|
||||
install_php_extensions tidy
|
||||
elif [ "$extension" = "gmp" ]; then
|
||||
install_php_extensions gmp
|
||||
elif [ "$extension" = "ldap" ]; then
|
||||
install_php_extensions ldap
|
||||
elif [ "$extension" = "imagick" ]; then
|
||||
install_php_extensions imagick
|
||||
elif [ "$extension" = "amqp" ]; then
|
||||
install_php_extensions amqp
|
||||
elif [ "$extension" = "zookeeper" ]; then
|
||||
install_php_extensions zookeeper
|
||||
elif [ "$extension" = "ioncube_loader" ]; then
|
||||
install_php_extensions ioncube_loader
|
||||
elif [ "$extension" = "pdo_sqlsrv" ]; then
|
||||
install_php_extensions pdo_sqlsrv
|
||||
elif [ "$extension" = "sqlsrv" ]; then
|
||||
install_php_extensions sqlsrv
|
||||
elif [ "$extension" = "enchant" ]; then
|
||||
install_php_extensions enchant
|
||||
elif [ "$extension" = "pspell" ]; then
|
||||
install_php_extensions pspell
|
||||
elif [ "$extension" = "bz2" ]; then
|
||||
install_php_extensions bz2
|
||||
elif [ "$extension" = "zmq" ]; then
|
||||
install_php_extensions zmq
|
||||
elif [ "$extension" = "smbclient" ]; then
|
||||
install_php_extensions smbclient
|
||||
elif [ "$extension" = "event" ]; then
|
||||
install_php_extensions event
|
||||
else
|
||||
install_extension_default $extension
|
||||
fi
|
||||
}
|
||||
|
||||
extension=$1
|
||||
|
||||
if [[ $extension == *,* ]]; then
|
||||
echo "${extension}" | tr ',' '\n' | while read -r extension; do
|
||||
apt-get update
|
||||
install_extension $extension
|
||||
done
|
||||
else
|
||||
apt-get update
|
||||
install_extension $extension
|
||||
fi
|
||||
|
||||
docker-php-source delete
|
||||
423
php/7/conf/php-fpm.conf
Normal file
423
php/7/conf/php-fpm.conf
Normal file
@ -0,0 +1,423 @@
|
||||
; Start a new pool named 'www'.
|
||||
; the variable $pool can be used in any directive and will be replaced by the
|
||||
; pool name ('www' here)
|
||||
[www]
|
||||
|
||||
; Per pool prefix
|
||||
; It only applies on the following directives:
|
||||
; - 'access.log'
|
||||
; - 'slowlog'
|
||||
; - 'listen' (unixsocket)
|
||||
; - 'chroot'
|
||||
; - 'chdir'
|
||||
; - 'php_values'
|
||||
; - 'php_admin_values'
|
||||
; When not set, the global prefix (or NONE) applies instead.
|
||||
; Note: This directive can also be relative to the global prefix.
|
||||
; Default Value: none
|
||||
;prefix = /path/to/pools/$pool
|
||||
|
||||
; Unix user/group of processes
|
||||
; Note: The user is mandatory. If the group is not set, the default user's group
|
||||
; will be used.
|
||||
user = www-data
|
||||
group = www-data
|
||||
|
||||
; The address on which to accept FastCGI requests.
|
||||
; Valid syntaxes are:
|
||||
; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on
|
||||
; a specific port;
|
||||
; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on
|
||||
; a specific port;
|
||||
; 'port' - to listen on a TCP socket to all addresses
|
||||
; (IPv6 and IPv4-mapped) on a specific port;
|
||||
; '/path/to/unix/socket' - to listen on a unix socket.
|
||||
; Note: This value is mandatory.
|
||||
listen = 127.0.0.1:9000
|
||||
|
||||
; Set listen(2) backlog.
|
||||
; Default Value: 511 (-1 on FreeBSD and OpenBSD)
|
||||
;listen.backlog = 511
|
||||
|
||||
; Set permissions for unix socket, if one is used. In Linux, read/write
|
||||
; permissions must be set in order to allow connections from a web server. Many
|
||||
; BSD-derived systems allow connections regardless of permissions.
|
||||
; Default Values: user and group are set as the running user
|
||||
; mode is set to 0660
|
||||
;listen.owner = www-data
|
||||
;listen.group = www-data
|
||||
;listen.mode = 0660
|
||||
; When POSIX Access Control Lists are supported you can set them using
|
||||
; these options, value is a comma separated list of user/group names.
|
||||
; When set, listen.owner and listen.group are ignored
|
||||
;listen.acl_users =
|
||||
;listen.acl_groups =
|
||||
|
||||
; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect.
|
||||
; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
|
||||
; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
|
||||
; must be separated by a comma. If this value is left blank, connections will be
|
||||
; accepted from any ip address.
|
||||
; Default Value: any
|
||||
;listen.allowed_clients = 127.0.0.1
|
||||
|
||||
; Specify the nice(2) priority to apply to the pool processes (only if set)
|
||||
; The value can vary from -19 (highest priority) to 20 (lower priority)
|
||||
; Note: - It will only work if the FPM master process is launched as root
|
||||
; - The pool processes will inherit the master process priority
|
||||
; unless it specified otherwise
|
||||
; Default Value: no set
|
||||
; process.priority = -19
|
||||
|
||||
; Set the process dumpable flag (PR_SET_DUMPABLE prctl) even if the process user
|
||||
; or group is differrent than the master process user. It allows to create process
|
||||
; core dump and ptrace the process for the pool user.
|
||||
; Default Value: no
|
||||
; process.dumpable = yes
|
||||
|
||||
; Choose how the process manager will control the number of child processes.
|
||||
; Possible Values:
|
||||
; static - a fixed number (pm.max_children) of child processes;
|
||||
; dynamic - the number of child processes are set dynamically based on the
|
||||
; following directives. With this process management, there will be
|
||||
; always at least 1 children.
|
||||
; pm.max_children - the maximum number of children that can
|
||||
; be alive at the same time.
|
||||
; pm.start_servers - the number of children created on startup.
|
||||
; pm.min_spare_servers - the minimum number of children in 'idle'
|
||||
; state (waiting to process). If the number
|
||||
; of 'idle' processes is less than this
|
||||
; number then some children will be created.
|
||||
; pm.max_spare_servers - the maximum number of children in 'idle'
|
||||
; state (waiting to process). If the number
|
||||
; of 'idle' processes is greater than this
|
||||
; number then some children will be killed.
|
||||
; ondemand - no children are created at startup. Children will be forked when
|
||||
; new requests will connect. The following parameter are used:
|
||||
; pm.max_children - the maximum number of children that
|
||||
; can be alive at the same time.
|
||||
; pm.process_idle_timeout - The number of seconds after which
|
||||
; an idle process will be killed.
|
||||
; Note: This value is mandatory.
|
||||
pm = dynamic
|
||||
|
||||
; The number of child processes to be created when pm is set to 'static' and the
|
||||
; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
|
||||
; This value sets the limit on the number of simultaneous requests that will be
|
||||
; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
|
||||
; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
|
||||
; CGI. The below defaults are based on a server without much resources. Don't
|
||||
; forget to tweak pm.* to fit your needs.
|
||||
; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
|
||||
; Note: This value is mandatory.
|
||||
pm.max_children = 10
|
||||
|
||||
; The number of child processes created on startup.
|
||||
; Note: Used only when pm is set to 'dynamic'
|
||||
; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
|
||||
pm.start_servers = 2
|
||||
|
||||
; The desired minimum number of idle server processes.
|
||||
; Note: Used only when pm is set to 'dynamic'
|
||||
; Note: Mandatory when pm is set to 'dynamic'
|
||||
pm.min_spare_servers = 1
|
||||
|
||||
; The desired maximum number of idle server processes.
|
||||
; Note: Used only when pm is set to 'dynamic'
|
||||
; Note: Mandatory when pm is set to 'dynamic'
|
||||
pm.max_spare_servers = 3
|
||||
|
||||
; The number of seconds after which an idle process will be killed.
|
||||
; Note: Used only when pm is set to 'ondemand'
|
||||
; Default Value: 10s
|
||||
;pm.process_idle_timeout = 10s;
|
||||
|
||||
; The number of requests each child process should execute before respawning.
|
||||
; This can be useful to work around memory leaks in 3rd party libraries. For
|
||||
; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
|
||||
; Default Value: 0
|
||||
;pm.max_requests = 500
|
||||
|
||||
; The URI to view the FPM status page. If this value is not set, no URI will be
|
||||
; recognized as a status page. It shows the following informations:
|
||||
; pool - the name of the pool;
|
||||
; process manager - static, dynamic or ondemand;
|
||||
; start time - the date and time FPM has started;
|
||||
; start since - number of seconds since FPM has started;
|
||||
; accepted conn - the number of request accepted by the pool;
|
||||
; listen queue - the number of request in the queue of pending
|
||||
; connections (see backlog in listen(2));
|
||||
; max listen queue - the maximum number of requests in the queue
|
||||
; of pending connections since FPM has started;
|
||||
; listen queue len - the size of the socket queue of pending connections;
|
||||
; idle processes - the number of idle processes;
|
||||
; active processes - the number of active processes;
|
||||
; total processes - the number of idle + active processes;
|
||||
; max active processes - the maximum number of active processes since FPM
|
||||
; has started;
|
||||
; max children reached - number of times, the process limit has been reached,
|
||||
; when pm tries to start more children (works only for
|
||||
; pm 'dynamic' and 'ondemand');
|
||||
; Value are updated in real time.
|
||||
; Example output:
|
||||
; pool: www
|
||||
; process manager: static
|
||||
; start time: 01/Jul/2011:17:53:49 +0200
|
||||
; start since: 62636
|
||||
; accepted conn: 190460
|
||||
; listen queue: 0
|
||||
; max listen queue: 1
|
||||
; listen queue len: 42
|
||||
; idle processes: 4
|
||||
; active processes: 11
|
||||
; total processes: 15
|
||||
; max active processes: 12
|
||||
; max children reached: 0
|
||||
;
|
||||
; By default the status page output is formatted as text/plain. Passing either
|
||||
; 'html', 'xml' or 'json' in the query string will return the corresponding
|
||||
; output syntax. Example:
|
||||
; http://www.foo.bar/status
|
||||
; http://www.foo.bar/status?json
|
||||
; http://www.foo.bar/status?html
|
||||
; http://www.foo.bar/status?xml
|
||||
;
|
||||
; By default the status page only outputs short status. Passing 'full' in the
|
||||
; query string will also return status for each pool process.
|
||||
; Example:
|
||||
; http://www.foo.bar/status?full
|
||||
; http://www.foo.bar/status?json&full
|
||||
; http://www.foo.bar/status?html&full
|
||||
; http://www.foo.bar/status?xml&full
|
||||
; The Full status returns for each process:
|
||||
; pid - the PID of the process;
|
||||
; state - the state of the process (Idle, Running, ...);
|
||||
; start time - the date and time the process has started;
|
||||
; start since - the number of seconds since the process has started;
|
||||
; requests - the number of requests the process has served;
|
||||
; request duration - the duration in µs of the requests;
|
||||
; request method - the request method (GET, POST, ...);
|
||||
; request URI - the request URI with the query string;
|
||||
; content length - the content length of the request (only with POST);
|
||||
; user - the user (PHP_AUTH_USER) (or '-' if not set);
|
||||
; script - the main script called (or '-' if not set);
|
||||
; last request cpu - the %cpu the last request consumed
|
||||
; it's always 0 if the process is not in Idle state
|
||||
; because CPU calculation is done when the request
|
||||
; processing has terminated;
|
||||
; last request memory - the max amount of memory the last request consumed
|
||||
; it's always 0 if the process is not in Idle state
|
||||
; because memory calculation is done when the request
|
||||
; processing has terminated;
|
||||
; If the process is in Idle state, then informations are related to the
|
||||
; last request the process has served. Otherwise informations are related to
|
||||
; the current request being served.
|
||||
; Example output:
|
||||
; ************************
|
||||
; pid: 31330
|
||||
; state: Running
|
||||
; start time: 01/Jul/2011:17:53:49 +0200
|
||||
; start since: 63087
|
||||
; requests: 12808
|
||||
; request duration: 1250261
|
||||
; request method: GET
|
||||
; request URI: /test_mem.php?N=10000
|
||||
; content length: 0
|
||||
; user: -
|
||||
; script: /home/fat/web/docs/php/test_mem.php
|
||||
; last request cpu: 0.00
|
||||
; last request memory: 0
|
||||
;
|
||||
; Note: There is a real-time FPM status monitoring sample web page available
|
||||
; It's available in: /usr/local/share/php/fpm/status.html
|
||||
;
|
||||
; Note: The value must start with a leading slash (/). The value can be
|
||||
; anything, but it may not be a good idea to use the .php extension or it
|
||||
; may conflict with a real PHP file.
|
||||
; Default Value: not set
|
||||
;pm.status_path = /status
|
||||
|
||||
; The ping URI to call the monitoring page of FPM. If this value is not set, no
|
||||
; URI will be recognized as a ping page. This could be used to test from outside
|
||||
; that FPM is alive and responding, or to
|
||||
; - create a graph of FPM availability (rrd or such);
|
||||
; - remove a server from a group if it is not responding (load balancing);
|
||||
; - trigger alerts for the operating team (24/7).
|
||||
; Note: The value must start with a leading slash (/). The value can be
|
||||
; anything, but it may not be a good idea to use the .php extension or it
|
||||
; may conflict with a real PHP file.
|
||||
; Default Value: not set
|
||||
;ping.path = /ping
|
||||
|
||||
; This directive may be used to customize the response of a ping request. The
|
||||
; response is formatted as text/plain with a 200 response code.
|
||||
; Default Value: pong
|
||||
;ping.response = pong
|
||||
|
||||
; The access log file
|
||||
; Default: not set
|
||||
;access.log = log/$pool.access.log
|
||||
|
||||
; The access log format.
|
||||
; The following syntax is allowed
|
||||
; %%: the '%' character
|
||||
; %C: %CPU used by the request
|
||||
; it can accept the following format:
|
||||
; - %{user}C for user CPU only
|
||||
; - %{system}C for system CPU only
|
||||
; - %{total}C for user + system CPU (default)
|
||||
; %d: time taken to serve the request
|
||||
; it can accept the following format:
|
||||
; - %{seconds}d (default)
|
||||
; - %{miliseconds}d
|
||||
; - %{mili}d
|
||||
; - %{microseconds}d
|
||||
; - %{micro}d
|
||||
; %e: an environment variable (same as $_ENV or $_SERVER)
|
||||
; it must be associated with embraces to specify the name of the env
|
||||
; variable. Some exemples:
|
||||
; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e
|
||||
; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e
|
||||
; %f: script filename
|
||||
; %l: content-length of the request (for POST request only)
|
||||
; %m: request method
|
||||
; %M: peak of memory allocated by PHP
|
||||
; it can accept the following format:
|
||||
; - %{bytes}M (default)
|
||||
; - %{kilobytes}M
|
||||
; - %{kilo}M
|
||||
; - %{megabytes}M
|
||||
; - %{mega}M
|
||||
; %n: pool name
|
||||
; %o: output header
|
||||
; it must be associated with embraces to specify the name of the header:
|
||||
; - %{Content-Type}o
|
||||
; - %{X-Powered-By}o
|
||||
; - %{Transfert-Encoding}o
|
||||
; - ....
|
||||
; %p: PID of the child that serviced the request
|
||||
; %P: PID of the parent of the child that serviced the request
|
||||
; %q: the query string
|
||||
; %Q: the '?' character if query string exists
|
||||
; %r: the request URI (without the query string, see %q and %Q)
|
||||
; %R: remote IP address
|
||||
; %s: status (response code)
|
||||
; %t: server time the request was received
|
||||
; it can accept a strftime(3) format:
|
||||
; %d/%b/%Y:%H:%M:%S %z (default)
|
||||
; The strftime(3) format must be encapsuled in a %{<strftime_format>}t tag
|
||||
; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t
|
||||
; %T: time the log has been written (the request has finished)
|
||||
; it can accept a strftime(3) format:
|
||||
; %d/%b/%Y:%H:%M:%S %z (default)
|
||||
; The strftime(3) format must be encapsuled in a %{<strftime_format>}t tag
|
||||
; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t
|
||||
; %u: remote user
|
||||
;
|
||||
; Default: "%R - %u %t \"%m %r\" %s"
|
||||
;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%"
|
||||
|
||||
; The log file for slow requests
|
||||
; Default Value: not set
|
||||
; Note: slowlog is mandatory if request_slowlog_timeout is set
|
||||
slowlog = /var/log/php/fpm.slow.log
|
||||
|
||||
; The timeout for serving a single request after which a PHP backtrace will be
|
||||
; dumped to the 'slowlog' file. A value of '0s' means 'off'.
|
||||
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
|
||||
; Default Value: 0
|
||||
request_slowlog_timeout = 3
|
||||
|
||||
; Depth of slow log stack trace.
|
||||
; Default Value: 20
|
||||
;request_slowlog_trace_depth = 20
|
||||
|
||||
; The timeout for serving a single request after which the worker process will
|
||||
; be killed. This option should be used when the 'max_execution_time' ini option
|
||||
; does not stop script execution for some reason. A value of '0' means 'off'.
|
||||
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
|
||||
; Default Value: 0
|
||||
;request_terminate_timeout = 0
|
||||
|
||||
; Set open file descriptor rlimit.
|
||||
; Default Value: system defined value
|
||||
;rlimit_files = 1024
|
||||
|
||||
; Set max core size rlimit.
|
||||
; Possible Values: 'unlimited' or an integer greater or equal to 0
|
||||
; Default Value: system defined value
|
||||
;rlimit_core = 0
|
||||
|
||||
; Chroot to this directory at the start. This value must be defined as an
|
||||
; absolute path. When this value is not set, chroot is not used.
|
||||
; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
|
||||
; of its subdirectories. If the pool prefix is not set, the global prefix
|
||||
; will be used instead.
|
||||
; Note: chrooting is a great security feature and should be used whenever
|
||||
; possible. However, all PHP paths will be relative to the chroot
|
||||
; (error_log, sessions.save_path, ...).
|
||||
; Default Value: not set
|
||||
;chroot =
|
||||
|
||||
; Chdir to this directory at the start.
|
||||
; Note: relative path can be used.
|
||||
; Default Value: current directory or / when chroot
|
||||
;chdir = /var/www
|
||||
|
||||
; Redirect worker stdout and stderr into main error log. If not set, stdout and
|
||||
; stderr will be redirected to /dev/null according to FastCGI specs.
|
||||
; Note: on highloaded environement, this can cause some delay in the page
|
||||
; process time (several ms).
|
||||
; Default Value: no
|
||||
catch_workers_output = yes
|
||||
|
||||
; Clear environment in FPM workers
|
||||
; Prevents arbitrary environment variables from reaching FPM worker processes
|
||||
; by clearing the environment in workers before env vars specified in this
|
||||
; pool configuration are added.
|
||||
; Setting to "no" will make all environment variables available to PHP code
|
||||
; via getenv(), $_ENV and $_SERVER.
|
||||
; Default Value: yes
|
||||
;clear_env = no
|
||||
|
||||
; Limits the extensions of the main script FPM will allow to parse. This can
|
||||
; prevent configuration mistakes on the web server side. You should only limit
|
||||
; FPM to .php extensions to prevent malicious users to use other extensions to
|
||||
; execute php code.
|
||||
; Note: set an empty value to allow all extensions.
|
||||
; Default Value: .php
|
||||
;security.limit_extensions = .php .php3 .php4 .php5 .php7
|
||||
|
||||
; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
|
||||
; the current environment.
|
||||
; Default Value: clean env
|
||||
;env[HOSTNAME] = $HOSTNAME
|
||||
;env[PATH] = /usr/local/bin:/usr/bin:/bin
|
||||
;env[TMP] = /tmp
|
||||
;env[TMPDIR] = /tmp
|
||||
;env[TEMP] = /tmp
|
||||
|
||||
; Additional php.ini defines, specific to this pool of workers. These settings
|
||||
; overwrite the values previously defined in the php.ini. The directives are the
|
||||
; same as the PHP SAPI:
|
||||
; php_value/php_flag - you can set classic ini defines which can
|
||||
; be overwritten from PHP call 'ini_set'.
|
||||
; php_admin_value/php_admin_flag - these directives won't be overwritten by
|
||||
; PHP call 'ini_set'
|
||||
; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
|
||||
|
||||
; Defining 'extension' will load the corresponding shared extension from
|
||||
; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
|
||||
; overwrite previously defined php.ini values, but will append the new value
|
||||
; instead.
|
||||
|
||||
; Note: path INI options can be relative and will be expanded with the prefix
|
||||
; (pool, global or /usr/local)
|
||||
|
||||
; Default Value: nothing is defined by default except the values in php.ini and
|
||||
; specified at startup with the -d argument
|
||||
;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
|
||||
;php_flag[display_errors] = off
|
||||
;php_admin_value[error_log] = /var/log/fpm-php.www.log
|
||||
;php_admin_flag[log_errors] = on
|
||||
;php_admin_value[memory_limit] = 32M
|
||||
1933
php/7/conf/php.ini
Normal file
1933
php/7/conf/php.ini
Normal file
File diff suppressed because it is too large
Load Diff
107
php/7/data.yml
Executable file
107
php/7/data.yml
Executable file
@ -0,0 +1,107 @@
|
||||
additionalProperties:
|
||||
formFields:
|
||||
- type: select
|
||||
multiple: true
|
||||
labelZh: 默认扩展
|
||||
labelEn: Extensions
|
||||
allowCreate: true
|
||||
default:
|
||||
- mysqli
|
||||
values:
|
||||
- label: opcache
|
||||
value: opcache
|
||||
- label: memcached
|
||||
value: memcached
|
||||
- label: memcache
|
||||
value: memcache
|
||||
- label: redis
|
||||
value: redis
|
||||
- label: mcrypt
|
||||
value: mcrypt
|
||||
- label: xdebug
|
||||
value: xdebug
|
||||
- label: imap
|
||||
value: imap
|
||||
- label: exif
|
||||
value: exif
|
||||
- label: intl
|
||||
value: intl
|
||||
- label: swoole
|
||||
value: swoole
|
||||
- label: yaf
|
||||
value: yaf
|
||||
- label: pgsql
|
||||
value: pgsql
|
||||
- label: pdo_pgsql
|
||||
value: pdo_pgsql
|
||||
- label: snmp
|
||||
value: snmp
|
||||
- label: ldap
|
||||
value: ldap
|
||||
- label: pspell
|
||||
value: pspell
|
||||
- label: bz2
|
||||
value: bz2
|
||||
- label: sysvshm
|
||||
value: sysvshm
|
||||
- label: calendar
|
||||
value: calendar
|
||||
- label: gmp
|
||||
value: gmp
|
||||
- label: sysvmsg
|
||||
value: sysvmsg
|
||||
- label: igbinary
|
||||
value: igbinary
|
||||
- label: mysqli
|
||||
value: mysqli
|
||||
- label: pdo_mysql
|
||||
value: pdo_mysql
|
||||
- label: mbstring
|
||||
value: mbstring
|
||||
- label: gd
|
||||
value: gd
|
||||
- label: ioncube_loader
|
||||
value: ioncube_loader
|
||||
- label: curl
|
||||
value: curl
|
||||
- label: sg15
|
||||
value: sourceguardian
|
||||
- label: sg11
|
||||
value: sourceguardian
|
||||
- label: imagick
|
||||
value: imagick
|
||||
envKey: PHP_EXTENSIONS
|
||||
- default: 7.4.33
|
||||
envKey: PHP_VERSION
|
||||
labelEn: PHP Version
|
||||
labelZh: PHP 版本
|
||||
required: true
|
||||
type: select
|
||||
values:
|
||||
- label: "7.4.33"
|
||||
value: "7.4.33"
|
||||
- label: "7.3.33"
|
||||
value: "7.3.33"
|
||||
- label: "7.2.34"
|
||||
value: "7.2.34"
|
||||
- label: "7.1.33"
|
||||
value: "7.1.33"
|
||||
- label: "7.0.33"
|
||||
value: "7.0.33"
|
||||
- default: https://mirrors.tuna.tsinghua.edu.cn
|
||||
envKey: CONTAINER_PACKAGE_URL
|
||||
labelEn: Package Source
|
||||
labelZh: 扩展源
|
||||
required: true
|
||||
type: select
|
||||
values:
|
||||
- label: "https://mirrors.tuna.tsinghua.edu.cn"
|
||||
value: "https://mirrors.tuna.tsinghua.edu.cn"
|
||||
- default: 9000
|
||||
envKey: PANEL_APP_PORT_HTTP
|
||||
labelEn: PHP-FPM Port
|
||||
labelZh: PHP-FPM 端口
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
|
||||
34
php/7/docker-compose.yml
Normal file
34
php/7/docker-compose.yml
Normal file
@ -0,0 +1,34 @@
|
||||
services:
|
||||
php:
|
||||
build:
|
||||
context: ./build
|
||||
args:
|
||||
PHP_IMAGE: 1panel/php:${PHP_VERSION}-fpm
|
||||
CONTAINER_PACKAGE_URL: ${CONTAINER_PACKAGE_URL}
|
||||
PHP_EXTENSIONS: ${PHP_EXTENSIONS}
|
||||
TZ: ${TZ}
|
||||
image: ${IMAGE_NAME}
|
||||
container_name: ${CONTAINER_NAME}
|
||||
restart: always
|
||||
networks:
|
||||
- 1panel-network
|
||||
volumes:
|
||||
- ${PANEL_WEBSITE_DIR}:/www/
|
||||
- ./conf:/usr/local/etc/php
|
||||
- ./conf/conf.d:/usr/local/etc/php/conf.d
|
||||
- ./conf/php-fpm.conf:/usr/local/etc/php-fpm.d/www.conf
|
||||
- ./log:/var/log/php
|
||||
- ./extensions:${EXTENSION_DIR}
|
||||
- ./supervisor/supervisord.conf:/etc/supervisord.conf
|
||||
- ./supervisor/supervisor.d/php-fpm.ini:/etc/supervisor.d/php-fpm.ini
|
||||
- ./supervisor/supervisor.d:/etc/supervisor.d
|
||||
- ./supervisor/log:/var/log/supervisor
|
||||
ports:
|
||||
- 127.0.0.1:${PANEL_APP_PORT_HTTP}:9000
|
||||
labels:
|
||||
createdBy: "Apps"
|
||||
cap_add:
|
||||
- SYS_PTRACE
|
||||
networks:
|
||||
1panel-network:
|
||||
external: true
|
||||
11
php/7/supervisor/supervisor.d/php-fpm.ini
Normal file
11
php/7/supervisor/supervisor.d/php-fpm.ini
Normal file
@ -0,0 +1,11 @@
|
||||
[program:php-fpm]
|
||||
command=php-fpm
|
||||
process_name=%(program_name)s_%(process_num)02d
|
||||
user=root
|
||||
numprocs=1
|
||||
autostart=true
|
||||
autorestart=false
|
||||
startsecs=0
|
||||
redirect_stderr=true
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
155
php/7/supervisor/supervisord.conf
Normal file
155
php/7/supervisor/supervisord.conf
Normal file
@ -0,0 +1,155 @@
|
||||
; Sample supervisor config file.
|
||||
;
|
||||
; For more information on the config file, please see:
|
||||
; http://supervisord.org/configuration.html
|
||||
;
|
||||
; Notes:
|
||||
; - Shell expansion ("~" or "$HOME") is not supported. Environment
|
||||
; variables can be expanded using this syntax: "%(ENV_HOME)s".
|
||||
; - Quotes around values are not supported, except in the case of
|
||||
; the environment= options as shown below.
|
||||
; - Comments must have a leading space: "a=b ;comment" not "a=b;comment".
|
||||
; - Command will be truncated if it looks like a config file comment, e.g.
|
||||
; "command=bash -c 'foo ; bar'" will truncate to "command=bash -c 'foo ".
|
||||
[unix_http_server]
|
||||
; the path to the socket file
|
||||
file = /run/supervisor.sock
|
||||
|
||||
; chmod=0700 ; socket file mode (default 0700)
|
||||
; chown=nobody:nogroup ; socket file uid:gid owner
|
||||
; username=user ; default is no username (open server)
|
||||
; password=123 ; default is no password (open server)
|
||||
; inet (TCP) server disabled by default
|
||||
[inet_http_server]
|
||||
; ip_address:port specifier, *:port for all iface
|
||||
port = 127.0.0.1:9002
|
||||
|
||||
; username=user ; default is no username (open server)
|
||||
; password=123 ; default is no password (open server)
|
||||
[supervisord]
|
||||
; main log file; default $CWD/supervisord.log
|
||||
logfile = /var/log/supervisord.log
|
||||
; max main logfile bytes b4 rotation; default 50MB
|
||||
logfile_maxbytes = 50MB
|
||||
; # of main logfile backups; 0 means none, default 11
|
||||
logfile_backups = 10
|
||||
; log level; default info; others: debug,warn,trace
|
||||
loglevel = info
|
||||
; supervisord pidfile; default supervisord.pid
|
||||
pidfile = /run/supervisord.pid
|
||||
; start in foreground if true; default false
|
||||
nodaemon = true
|
||||
; min. avail startup file descriptors; default 1024
|
||||
minfds = 1024
|
||||
; min. avail process descriptors;default 200
|
||||
minprocs = 200
|
||||
; umask=022 ; process file creation umask; default 022
|
||||
; user=supervisord ; setuid to this UNIX account at startup; recommended if root
|
||||
; identifier=supervisor ; supervisord identifier, default is 'supervisor'
|
||||
; directory=/tmp ; default is not to cd during start
|
||||
; nocleanup=true ; don't clean up tempfiles at start; default false
|
||||
; 'AUTO' child log dir, default $TEMP
|
||||
childlogdir = /var/log/supervisor
|
||||
|
||||
; environment=KEY="value" ; key value pairs to add to environment
|
||||
; strip_ansi=false ; strip ansi escape codes in logs; def. false
|
||||
; The rpcinterface:supervisor section must remain in the config file for
|
||||
; RPC (supervisorctl/web interface) to work. Additional interfaces may be
|
||||
; added by defining them in separate [rpcinterface:x] sections.
|
||||
[rpcinterface:supervisor]
|
||||
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
||||
|
||||
; The supervisorctl section configures how supervisorctl will connect to
|
||||
; supervisord. configure it match the settings in either the unix_http_server
|
||||
; or inet_http_server section.
|
||||
[supervisorctl]
|
||||
; use a unix:// URL for a unix socket
|
||||
serverurl = unix:///run/supervisor.sock
|
||||
|
||||
; serverurl=http://127.0.0.1:9001 ; use an http:// url to specify an inet socket
|
||||
; username=chris ; should be same as in [*_http_server] if set
|
||||
; password=123 ; should be same as in [*_http_server] if set
|
||||
; prompt=mysupervisor ; cmd line prompt (default "supervisor")
|
||||
; history_file=~/.sc_history ; use readline history if available
|
||||
; The sample program section below shows all possible program subsection values.
|
||||
; Create one or more 'real' program: sections to be able to control them under
|
||||
; supervisor.
|
||||
; [program:theprogramname]
|
||||
; command=/bin/cat ; the program (relative uses PATH, can take args)
|
||||
; process_name=%(program_name)s ; process_name expr (default %(program_name)s)
|
||||
; numprocs=1 ; number of processes copies to start (def 1)
|
||||
; directory=/tmp ; directory to cwd to before exec (def no cwd)
|
||||
; umask=022 ; umask for process (default None)
|
||||
; priority=999 ; the relative start priority (default 999)
|
||||
; autostart=true ; start at supervisord start (default: true)
|
||||
; startsecs=1 ; # of secs prog must stay up to be running (def. 1)
|
||||
; startretries=3 ; max # of serial start failures when starting (default 3)
|
||||
; autorestart=unexpected ; when to restart if exited after running (def: unexpected)
|
||||
; exitcodes=0 ; 'expected' exit codes used with autorestart (default 0)
|
||||
; stopsignal=QUIT ; signal used to kill process (default TERM)
|
||||
; stopwaitsecs=10 ; max num secs to wait b4 SIGKILL (default 10)
|
||||
; stopasgroup=false ; send stop signal to the UNIX process group (default false)
|
||||
; killasgroup=false ; SIGKILL the UNIX process group (def false)
|
||||
; user=chrism ; setuid to this UNIX account to run the program
|
||||
; redirect_stderr=true ; redirect proc stderr to stdout (default false)
|
||||
; stdout_logfile=/a/path ; stdout log path, NONE for none; default AUTO
|
||||
; stdout_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
|
||||
; stdout_logfile_backups=10 ; # of stdout logfile backups (0 means none, default 10)
|
||||
; stdout_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
|
||||
; stdout_events_enabled=false ; emit events on stdout writes (default false)
|
||||
; stdout_syslog=false ; send stdout to syslog with process name (default false)
|
||||
; stderr_logfile=/a/path ; stderr log path, NONE for none; default AUTO
|
||||
; stderr_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
|
||||
; stderr_logfile_backups=10 ; # of stderr logfile backups (0 means none, default 10)
|
||||
; stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
|
||||
; stderr_events_enabled=false ; emit events on stderr writes (default false)
|
||||
; stderr_syslog=false ; send stderr to syslog with process name (default false)
|
||||
; environment=A="1",B="2" ; process environment additions (def no adds)
|
||||
; serverurl=AUTO ; override serverurl computation (childutils)
|
||||
; The sample eventlistener section below shows all possible eventlistener
|
||||
; subsection values. Create one or more 'real' eventlistener: sections to be
|
||||
; able to handle event notifications sent by supervisord.
|
||||
; [eventlistener:theeventlistenername]
|
||||
; command=/bin/eventlistener ; the program (relative uses PATH, can take args)
|
||||
; process_name=%(program_name)s ; process_name expr (default %(program_name)s)
|
||||
; numprocs=1 ; number of processes copies to start (def 1)
|
||||
; events=EVENT ; event notif. types to subscribe to (req'd)
|
||||
; buffer_size=10 ; event buffer queue size (default 10)
|
||||
; directory=/tmp ; directory to cwd to before exec (def no cwd)
|
||||
; umask=022 ; umask for process (default None)
|
||||
; priority=-1 ; the relative start priority (default -1)
|
||||
; autostart=true ; start at supervisord start (default: true)
|
||||
; startsecs=1 ; # of secs prog must stay up to be running (def. 1)
|
||||
; startretries=3 ; max # of serial start failures when starting (default 3)
|
||||
; autorestart=unexpected ; autorestart if exited after running (def: unexpected)
|
||||
; exitcodes=0 ; 'expected' exit codes used with autorestart (default 0)
|
||||
; stopsignal=QUIT ; signal used to kill process (default TERM)
|
||||
; stopwaitsecs=10 ; max num secs to wait b4 SIGKILL (default 10)
|
||||
; stopasgroup=false ; send stop signal to the UNIX process group (default false)
|
||||
; killasgroup=false ; SIGKILL the UNIX process group (def false)
|
||||
; user=chrism ; setuid to this UNIX account to run the program
|
||||
; redirect_stderr=false ; redirect_stderr=true is not allowed for eventlisteners
|
||||
; stdout_logfile=/a/path ; stdout log path, NONE for none; default AUTO
|
||||
; stdout_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
|
||||
; stdout_logfile_backups=10 ; # of stdout logfile backups (0 means none, default 10)
|
||||
; stdout_events_enabled=false ; emit events on stdout writes (default false)
|
||||
; stdout_syslog=false ; send stdout to syslog with process name (default false)
|
||||
; stderr_logfile=/a/path ; stderr log path, NONE for none; default AUTO
|
||||
; stderr_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
|
||||
; stderr_logfile_backups=10 ; # of stderr logfile backups (0 means none, default 10)
|
||||
; stderr_events_enabled=false ; emit events on stderr writes (default false)
|
||||
; stderr_syslog=false ; send stderr to syslog with process name (default false)
|
||||
; environment=A="1",B="2" ; process environment additions
|
||||
; serverurl=AUTO ; override serverurl computation (childutils)
|
||||
; The sample group section below shows all possible group values. Create one
|
||||
; or more 'real' group: sections to create "heterogeneous" process groups.
|
||||
; [group:thegroupname]
|
||||
; programs=progname1,progname2 ; each refers to 'x' in [program:x] definitions
|
||||
; priority=999 ; the relative start priority (default 999)
|
||||
; The [include] section can just contain the "files" setting. This
|
||||
; setting can list multiple files (separated by whitespace or
|
||||
; newlines). It can also contain wildcards. The filenames are
|
||||
; interpreted as relative to this file. Included files *cannot*
|
||||
; include files themselves.
|
||||
[include]
|
||||
files = /etc/supervisor.d/*.ini
|
||||
Loading…
x
Reference in New Issue
Block a user