0
0

Initial commit

This commit is contained in:
2022-08-28 10:48:09 +08:00
commit b4ac2dc4de
11 changed files with 167 additions and 0 deletions

13
docker/php/dockerfile Normal file
View File

@@ -0,0 +1,13 @@
FROM php:8.1-fpm
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN pecl channel-update pecl.php.net && \
# версию пакета oci8 для установки можно проверять здесь https://pecl.php.net/package/xdebug
pecl install xdebug-3.1.5
RUN mkdir -p /var/log/php
WORKDIR /var/www
EXPOSE 9000
CMD ["php-fpm"]

28
docker/php/php.ini Normal file
View File

@@ -0,0 +1,28 @@
[PHP]
file_uploads=Off
; upload_max_filesize=256M
; post_max_size=256M
error_reporting=E_ALL
;& ~E_DEPRECATED & ~E_STRICT & ~E_NOTICE & ~E_WARNING
[opcache]
opcache.enable=1
opcache.enable_cli=1
opcache.memory_consumption=128
opcache.max_accelerated_files=30000
opcache.revalidate_freq=0
; opcache.jit_buffer_size=64M
; opcache.jit=tracing
[xdebug]
; https://xdebug.org/docs/all_settings
zend_extension=xdebug.so
xdebug.mode=develop,debug
xdebug.REQUEST=*
xdebug.SESSION=*
xdebug.SERVER=*
xdebug.client_host=172.17.0.1
xdebug.start_with_request=yes
; xdebug.profiler_output_name=cachegrind.out.%r
; xdebug.trace_output_name=trace.%r
; xdebug.output_dir=/var/xdebug

21
docker/php/www.conf Normal file
View File

@@ -0,0 +1,21 @@
[www]
user = www-data
group = www-data
listen = 127.0.0.1:9000
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
pm.max_requests = 50
pm.status_path = /status
ping.path = /ping
ping.response = pong
access.log = /var/log/php/$pool.access.log
;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{milli}d %{kilo}M %C%%"
; chroot = /var/www
; chdir = /var/www
php_flag[display_errors] = on
php_admin_value[error_log] = /var/log/php/www.error.log
php_admin_flag[log_errors] = on
php_admin_value[memory_limit] = 32M