Initial commit
This commit is contained in:
30
docker/nginx/vhost.conf
Normal file
30
docker/nginx/vhost.conf
Normal file
@@ -0,0 +1,30 @@
|
||||
server {
|
||||
server_name myproj.local;
|
||||
listen 80;
|
||||
root /var/www;
|
||||
index index.php;
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_proxied any;
|
||||
gzip_comp_level 6;
|
||||
gzip_buffers 16 8k;
|
||||
gzip_http_version 1.1;
|
||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
location ~* \.(jpg|jpeg|gif|css|png|js|ico|html)$ {
|
||||
access_log off;
|
||||
expires max;
|
||||
log_not_found off;
|
||||
}
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php$is_args$args;
|
||||
}
|
||||
location ~ \.php$ {
|
||||
try_files $uri /index.php =404;
|
||||
fastcgi_pass php:9000;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
include fastcgi_params;
|
||||
}
|
||||
}
|
||||
13
docker/php/dockerfile
Normal file
13
docker/php/dockerfile
Normal 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
28
docker/php/php.ini
Normal 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
21
docker/php/www.conf
Normal 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
|
||||
Reference in New Issue
Block a user