diff --git a/config/docker-files/7.2-Dockerfile b/config/docker-files/7.2-Dockerfile index 886db6f273c07677817d2ff84c936459f486c607..1aa6b3c6daab8bc38ca580285f5395768a0c82c5 100644 --- a/config/docker-files/7.2-Dockerfile +++ b/config/docker-files/7.2-Dockerfile @@ -14,6 +14,7 @@ RUN apt update && apt install -y --no-install-recommends \ libzip-dev \ libicu-dev \ libfreetype6-dev \ + libxslt-dev \ libxml2-dev \ libmemcached11 libmemcachedutil2 build-essential libmemcached-dev libz-dev \ locales \ @@ -28,7 +29,7 @@ RUN sed -i -e 's/# en_GB.UTF-8 UTF-8/en_GB.UTF-8 UTF-8/' /etc/locale.gen \ # Install php extensions RUN docker-php-ext-configure gd --with-jpeg-dir --with-freetype-dir --with-webp-dir -RUN docker-php-ext-install -j$(nproc) gd gettext intl mysqli opcache pdo_mysql pdo_pgsql soap zip +RUN docker-php-ext-install -j$(nproc) gd gettext intl mysqli opcache pdo_mysql pdo_pgsql soap xsl zip # Install Memcached & redis RUN pecl install memcached redis \ diff --git a/config/docker-files/7.3-Dockerfile b/config/docker-files/7.3-Dockerfile index bd4720b5e83d0f165d807481a720afb9ebb8cf5c..d664f6fe3fed81c0de74c7514927bdead15a3733 100644 --- a/config/docker-files/7.3-Dockerfile +++ b/config/docker-files/7.3-Dockerfile @@ -14,6 +14,7 @@ RUN apt update && apt install -y --no-install-recommends \ libzip-dev \ libicu-dev \ libfreetype6-dev \ + libxslt-dev \ libxml2-dev \ libmemcached11 libmemcachedutil2 build-essential libmemcached-dev libz-dev \ locales \ @@ -28,7 +29,7 @@ RUN sed -i -e 's/# en_GB.UTF-8 UTF-8/en_GB.UTF-8 UTF-8/' /etc/locale.gen \ # Install php extensions RUN docker-php-ext-configure gd --with-jpeg-dir --with-freetype-dir --with-webp-dir -RUN docker-php-ext-install -j$(nproc) gd gettext intl mysqli opcache pdo_mysql pdo_pgsql soap zip +RUN docker-php-ext-install -j$(nproc) gd gettext intl mysqli opcache pdo_mysql pdo_pgsql soap xsl zip # Install Memcached RUN pecl install memcached redis \ diff --git a/config/docker-files/7.4-Dockerfile b/config/docker-files/7.4-Dockerfile index 2838589653b3264936c741539151e96d43740a26..b0b897297b24228d730a46af3d35e5f5eb8eba14 100644 --- a/config/docker-files/7.4-Dockerfile +++ b/config/docker-files/7.4-Dockerfile @@ -14,6 +14,7 @@ RUN apt update && apt install -y --no-install-recommends \ libzip-dev \ libicu-dev \ libfreetype6-dev \ + libxslt-dev \ libxml2-dev \ libmemcached11 libmemcachedutil2 build-essential libmemcached-dev libz-dev \ locales \ @@ -28,7 +29,7 @@ RUN sed -i -e 's/# en_GB.UTF-8 UTF-8/en_GB.UTF-8 UTF-8/' /etc/locale.gen \ # Install php extensions RUN docker-php-ext-configure gd --with-jpeg --with-freetype --with-webp -RUN docker-php-ext-install -j$(nproc) gd gettext intl opcache pdo_mysql pdo_pgsql soap zip +RUN docker-php-ext-install -j$(nproc) gd gettext intl opcache pdo_mysql pdo_pgsql soap xsl zip # Install Memcached & redis RUN pecl install memcached redis \ diff --git a/config/docker-files/8.0-Dockerfile b/config/docker-files/8.0-Dockerfile index 4cddac9ec3648a3402192f224dce5b54018772d2..39c1c033c174ebb9339e0a3997570b30f1bbce7e 100644 --- a/config/docker-files/8.0-Dockerfile +++ b/config/docker-files/8.0-Dockerfile @@ -14,6 +14,7 @@ RUN apt update && apt install -y --no-install-recommends \ libzip-dev \ libicu-dev \ libfreetype6-dev \ + libxslt-dev \ libxml2-dev \ libmemcached11 libmemcachedutil2 build-essential libmemcached-dev libz-dev \ locales \ @@ -28,7 +29,7 @@ RUN sed -i -e 's/# en_GB.UTF-8 UTF-8/en_GB.UTF-8 UTF-8/' /etc/locale.gen \ # Install php extensions RUN docker-php-ext-configure gd --with-jpeg --with-freetype --with-webp -RUN docker-php-ext-install -j$(nproc) gd gettext intl mysqli opcache pdo_mysql pdo_pgsql soap zip +RUN docker-php-ext-install -j$(nproc) gd gettext intl mysqli opcache pdo_mysql pdo_pgsql soap xsl zip # Install Memcached & redis RUN pecl install memcached redis \ diff --git a/config/docker-files/8.1-Dockerfile b/config/docker-files/8.1-Dockerfile index 4861cd685d80ccf82022a6fcdba0f772b1c38a1b..e39d102cb08974455b5ab66a4fd7f6358e252d6e 100644 --- a/config/docker-files/8.1-Dockerfile +++ b/config/docker-files/8.1-Dockerfile @@ -14,6 +14,7 @@ RUN apt update && apt install -y --no-install-recommends \ libzip-dev \ libicu-dev \ libfreetype6-dev \ + libxslt-dev \ libxml2-dev \ libmemcached11 libmemcachedutil2 build-essential libmemcached-dev libz-dev \ locales \ @@ -28,7 +29,7 @@ RUN sed -i -e 's/# en_GB.UTF-8 UTF-8/en_GB.UTF-8 UTF-8/' /etc/locale.gen \ # Install php extensions RUN docker-php-ext-configure gd --with-jpeg --with-freetype --with-webp -RUN docker-php-ext-install -j$(nproc) gd gettext intl mysqli opcache pdo_mysql pdo_pgsql soap zip +RUN docker-php-ext-install -j$(nproc) gd gettext intl mysqli opcache pdo_mysql pdo_pgsql soap xsl zip # Install Memcached & redis RUN pecl install memcached redis \ diff --git a/config/docker-files/8.2-Dockerfile b/config/docker-files/8.2-Dockerfile index efd288f90a7ed2684c86c26ca0870e23d00b009a..d4594a2e2c9b54a9932eff53d43fb807a8f6b5e9 100644 --- a/config/docker-files/8.2-Dockerfile +++ b/config/docker-files/8.2-Dockerfile @@ -14,6 +14,7 @@ RUN apt update && apt install -y --no-install-recommends \ libzip-dev \ libicu-dev \ libfreetype6-dev \ + libxslt-dev \ libxml2-dev \ libmemcached11 libmemcachedutil2 build-essential libmemcached-dev libz-dev \ locales \ @@ -28,7 +29,7 @@ RUN sed -i -e 's/# en_GB.UTF-8 UTF-8/en_GB.UTF-8 UTF-8/' /etc/locale.gen \ # Install php extensions RUN docker-php-ext-configure gd --with-jpeg --with-freetype --with-webp -RUN docker-php-ext-install -j$(nproc) gd gettext intl mysqli opcache pdo_mysql pdo_pgsql soap zip +RUN docker-php-ext-install -j$(nproc) gd gettext intl mysqli opcache pdo_mysql pdo_pgsql soap xsl zip # Install Memcached & redis RUN pecl install memcached redis \ diff --git a/config/docker-files/8.3-Dockerfile b/config/docker-files/8.3-Dockerfile index cf2ba3cd3705407ec604df8c30b8121363e95031..481b393082207183e71d6bcc20c73ed9bac54642 100644 --- a/config/docker-files/8.3-Dockerfile +++ b/config/docker-files/8.3-Dockerfile @@ -16,6 +16,7 @@ RUN apt update \ libzip-dev \ libicu-dev \ libfreetype6-dev \ + libxslt-dev \ libxml2-dev \ locales \ libmemcached11 libmemcachedutil2 build-essential libmemcached-dev libz-dev \ @@ -30,7 +31,7 @@ RUN sed -i -e 's/# en_GB.UTF-8 UTF-8/en_GB.UTF-8 UTF-8/' /etc/locale.gen \ # Install php extensions RUN docker-php-ext-configure gd --with-jpeg --with-freetype --with-webp -RUN docker-php-ext-install -j$(nproc) gd gettext intl mysqli opcache pdo_mysql pdo_pgsql soap zip +RUN docker-php-ext-install -j$(nproc) gd gettext intl mysqli opcache pdo_mysql pdo_pgsql soap xsl zip # Install Memcached and redis RUN pecl install memcached redis \ diff --git a/config/docker-files/8.4-Dockerfile b/config/docker-files/8.4-Dockerfile index 8fb001da670e28486a54020d33822f042a2bc35d..84c2a1960b77420d4b2bb41ad0b19bd095b8dd08 100644 --- a/config/docker-files/8.4-Dockerfile +++ b/config/docker-files/8.4-Dockerfile @@ -1,4 +1,4 @@ -FROM php:8.4.0alpha2-fpm +FROM php:8.4-rc-fpm # Install system requirements RUN apt update \ @@ -16,6 +16,7 @@ RUN apt update \ libzip-dev \ libicu-dev \ libfreetype6-dev \ + libxslt-dev \ libxml2-dev \ locales \ libmemcached11 libmemcachedutil2 build-essential libmemcached-dev libz-dev \ @@ -30,13 +31,11 @@ RUN sed -i -e 's/# en_GB.UTF-8 UTF-8/en_GB.UTF-8 UTF-8/' /etc/locale.gen \ # Install php extensions RUN docker-php-ext-configure gd --with-jpeg --with-freetype --with-webp -RUN docker-php-ext-install -j$(nproc) gd gettext intl mysqli opcache pdo_mysql pdo_pgsql soap zip +RUN docker-php-ext-install -j$(nproc) gd gettext intl mysqli opcache pdo_mysql pdo_pgsql soap xsl zip # Install Memcached and redis -# RUN pecl install memcached redis \ -# && docker-php-ext-enable memcached redis -RUN pecl install memcached \ - && docker-php-ext-enable memcached +RUN pecl install memcached redis \ + && docker-php-ext-enable memcached redis # Cleanup RUN docker-php-source delete \ diff --git a/config/nginx-php.conf b/config/nginx-php.conf index f1329d4fe6e60cbb0191a3ae715140ff96e37428..184b385e41835da07769fad6e67db005e2f0b927 100644 --- a/config/nginx-php.conf +++ b/config/nginx-php.conf @@ -8,4 +8,5 @@ location ~ \.php(?:$|/) { fastcgi_param DOCUMENT_ROOT $site_document_root; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_read_timeout 1200; } diff --git a/config/php-fpm.conf b/config/php-fpm.conf index 2d2ca09bd83d4b56365dc66ef790fe0173020c58..bab01d875199631ee60a094b0b02d4e7d7be31c2 100644 --- a/config/php-fpm.conf +++ b/config/php-fpm.conf @@ -2,3 +2,4 @@ php_admin_flag[log_errors] = on php_admin_value[error_log] = /var/log/error.log access.log = /dev/null pm.max_requests = 500 +request_terminate_timeout = 900 \ No newline at end of file diff --git a/config/php.ini b/config/php.ini index 610f462e10a19d9d522f689887b95359ee33bd5d..34a9445355a7a5b8858beb9bbb8ca52279dd253b 100644 --- a/config/php.ini +++ b/config/php.ini @@ -1,7 +1,8 @@ max_input_vars=10000 -max_execution_time=300 -upload_max_filesize=8M -post_max_size=9M +max_execution_time=1200 +max_file_uploads = 256 +upload_max_filesize=200M +post_max_size=200M error_reporting=22519 zend_extension=opcache.so diff --git a/lib/Commands/Compile.php b/lib/Commands/Compile.php index 51843e4c1434bbfe8a82595d32c308306db97aaf..5cb7c4511df5fb9e2d1da0a3e4e6d957e79978fb 100644 --- a/lib/Commands/Compile.php +++ b/lib/Commands/Compile.php @@ -163,6 +163,15 @@ final class Compile extends Command ), ]); + // DB + $creator->addService('db', 'mariadb:latest', [ + 'container_name' => 'db', + 'networks' => ['code-network'], + 'environment' => [ + 'MARIADB_RANDOM_ROOT_PASSWORD' => true, + ], + ]); + $mounts = [ "{$compiledPath}/nginx.conf" => 'conf.d/default.conf', "{$compiledPath}/nginx-sites.conf" => 'sites.conf', @@ -195,6 +204,7 @@ final class Compile extends Command 'MYSQL_HOST' => 'host.docker.internal', ], 'networks' => ['code-network'], + 'depends_on' => ['db'], ]); $creator->addServiceVolume( @@ -246,9 +256,10 @@ final class Compile extends Command 'server_name _', - 'proxy_read_timeout' => 300, - 'proxy_connect_timeout' => 300, - 'proxy_send_timeout' => 300, + 'proxy_read_timeout 1200', + 'proxy_connect_timeout 1200', + 'proxy_send_timeout 1200', + 'send_timeout 1200', 'access_log off', 'error_log off', @@ -283,7 +294,7 @@ final class Compile extends Command ]); $creator->addServer([ - 'listen ' . $sslPort . ' default_server ssl', + 'listen ' . $sslPort . ' default_server ssl http2', 'client_max_body_size 64M', 'set $fastcgi_backend ' . $index . '_backend', diff --git a/lib/Creators/NginxConfiguration.php b/lib/Creators/NginxConfiguration.php index ffcadca534aa69351d17eb91e9c8179f08df6da2..23b9e305bc65c4571e5abb91971ca46505bf2316 100644 --- a/lib/Creators/NginxConfiguration.php +++ b/lib/Creators/NginxConfiguration.php @@ -9,7 +9,7 @@ final class NginxConfiguration extends ConfigurationCreator public function addLocation(string $location, array $config, string $modifier = '^~') { $this->addConfiguration('location', [ - 'location' => $location = '/' . ltrim($location, '/'), + 'location' => '/' . ltrim($location, '/'), 'modifier' => $modifier, 'config' => $config, ]); @@ -17,6 +17,8 @@ final class NginxConfiguration extends ConfigurationCreator public function addServer(array $config) { + + $this->addConfiguration('server', [ 'config' => $config, ]);