diff --git a/Makefile b/Makefile index e8f9603..f464846 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ run: - docker-compose up -d --build nginx mysql5.7 php8.0 php7.4 php7.3 + docker-compose up -d --build nginx mysql5.7 php8.1 php8.0 php7.4 php7.3 cli-7.3: run docker exec -it php7.3 bash @@ -9,3 +9,6 @@ cli-7.4: run cli-8.0: run docker exec -it php8.0 bash + +cli-8.1: run + docker exec -it php8.1 bash \ No newline at end of file diff --git a/README.rst b/README.rst index d7f2566..d1c2e3f 100644 --- a/README.rst +++ b/README.rst @@ -11,7 +11,7 @@ English manual Docker-based development environment: -* PHP versions: 8.0, 7.4 and 7.3. +* PHP versions: 8.1, 8.0, 7.4 and 7.3. * MySQL 5.7 database server. * nginx web server. @@ -66,6 +66,7 @@ To use the specific PHP version for your requests, add the following prefix to t * ``php7.3.`` for PHP 7.3. * ``php7.4.`` for PHP 7.4. * ``php8.0.`` for PHP 8.0. +* ``php8.1.`` for PHP 8.1. --------------- Sending e-mails @@ -114,7 +115,7 @@ Uncomment the lines in docker-compose.yml and run the following commands: Среда для разработки на базе Docker: -* Версии PHP: 8.0, 7.4 и 7.3. +* Версии PHP: 8.1, 8.0, 7.4 и 7.3. * Сервер баз данных MySQL 5.7. * Веб-сервер nginx. @@ -168,6 +169,7 @@ Uncomment the lines in docker-compose.yml and run the following commands: * ``php7.3.`` для PHP 7.3. * ``php7.4.`` для PHP 7.4. * ``php8.0.`` для PHP 8.0. +* ``php8.1.`` для PHP 8.1. ------------------ Отправка e-mail'ов diff --git a/config/nginx/app.conf.example b/config/nginx/app.conf.example index 6dfab95..3f3d54f 100644 --- a/config/nginx/app.conf.example +++ b/config/nginx/app.conf.example @@ -5,6 +5,7 @@ map $http_host $fastcgi_backend { ~^php7.3. php7.3:9000; ~^php7.4. php7.4:9000; ~^php8.0. php8.0:9000; + ~^php8.1. php8.1:9000; } server { diff --git a/config/php8.0/Dockerfile b/config/php8.0/Dockerfile index eea60f6..63a8244 100644 --- a/config/php8.0/Dockerfile +++ b/config/php8.0/Dockerfile @@ -1,4 +1,4 @@ -FROM php:8.0-fpm +FROM php:8.0-rc-fpm ENV VERSION_ONIG=6.9.3 ENV ONIG_BUILD_DIR=/tmp/oniguruma diff --git a/config/php8.1/Dockerfile b/config/php8.1/Dockerfile new file mode 100644 index 0000000..42b6842 --- /dev/null +++ b/config/php8.1/Dockerfile @@ -0,0 +1,39 @@ +FROM php:8.1-rc-fpm + +ENV VERSION_ONIG=6.9.3 +ENV ONIG_BUILD_DIR=/tmp/oniguruma + +RUN set -xe; \ + mkdir -p ${ONIG_BUILD_DIR}; \ + curl -Ls https://github.com/kkos/oniguruma/releases/download/v${VERSION_ONIG}/onig-${VERSION_ONIG}.tar.gz \ + | tar xzC ${ONIG_BUILD_DIR} --strip-components=1; \ + cd ${ONIG_BUILD_DIR}/; \ + ./configure; \ + make -j $(nproc); \ + make install + +RUN set -xe; \ + mkdir -p /usr/src/php/ext/imagick; \ + curl -fsSL http://pecl.php.net/get/imagick-3.7.0.tgz \ + | tar xvz -C "/usr/src/php/ext/imagick" --strip-components=1; + +RUN set -xe; \ + apt update; \ + apt install --yes \ + mariadb-client \ + git \ + zip unzip \ + curl \ + libzip-dev libcurl4-gnutls-dev libpng-dev libxml2-dev libjpeg-dev libfreetype6-dev \ + libmagickwand-dev; \ + curl -sL https://deb.nodesource.com/setup_12.x | bash -; \ + apt install -y nodejs; \ + docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/; \ + docker-php-ext-install pdo_mysql mysqli gd zip intl soap mbstring exif bcmath curl sockets; \ + docker-php-ext-install imagick; \ + docker-php-ext-enable imagick; \ + docker-php-ext-enable mysqli; + +# RUN set -xe ; \ +# pecl install xdebug; \ +# docker-php-ext-enable xdebug diff --git a/config/php8.1/php-ini-overrides.ini b/config/php8.1/php-ini-overrides.ini new file mode 100644 index 0000000..ec06982 --- /dev/null +++ b/config/php8.1/php-ini-overrides.ini @@ -0,0 +1,7 @@ +upload_max_filesize = 100M +post_max_size = 108M +max_execution_time = 3600 +sendmail_path = "/usr/local/bin/sendmail --logdir=/app/log/sendmail/ " +xdebug.mode=debug +xdebug.client_host=host.docker.internal +xdebug.start_with_request=yes diff --git a/docker-compose.yml b/docker-compose.yml index 16898b3..29b92c0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -25,6 +25,7 @@ services: - php7.3 - php7.4 - php8.0 + - php8.1 php7.3: build: @@ -65,6 +66,19 @@ services: environment: PHP_IDE_CONFIG: serverName=localhost + php8.1: + build: + context: ./config/php8.1 + dockerfile: Dockerfile + container_name: php8.1 + working_dir: /app + volumes: + - ./app:/app + - ./config/php8.1/php-ini-overrides.ini:/usr/local/etc/php/conf.d/00-php.ini + - ./bin/sendmail:/usr/local/bin/sendmail + environment: + PHP_IDE_CONFIG: serverName=localhost + # Change default subnet addresses (for uncomment - delete only '#'): #networks: # default: