From fcdd745fb9ba95c65c2e29d8976f783e0610d58f Mon Sep 17 00:00:00 2001 From: Chris Fidao Date: Mon, 2 Dec 2019 07:49:55 -0600 Subject: [PATCH] updating to php7.4 --- README.md | 2 +- docker-files/docker/app/Dockerfile | 28 ++++++++++++------------ docker-files/docker/app/default | 2 +- docker-files/docker/app/php-fpm.conf | 4 ++-- docker-files/docker/app/start-container | 6 ++--- docker-files/docker/app/supervisord.conf | 2 +- 6 files changed, 22 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index e5baaf6..fb8a467 100644 --- a/README.md +++ b/README.md @@ -177,7 +177,7 @@ As mentioned, anything not recognized as a built-in command will be used as an a The aim of this project is simplicity. It includes: -* PHP 7.3 +* PHP 7.4 * MySQL 5.7 * Redis ([latest](https://hub.docker.com/_/redis/)) * NodeJS ([latest](https://hub.docker.com/_/node/)), with Yarn & Gulp diff --git a/docker-files/docker/app/Dockerfile b/docker-files/docker/app/Dockerfile index ac8f206..754cdaa 100644 --- a/docker-files/docker/app/Dockerfile +++ b/docker-files/docker/app/Dockerfile @@ -18,23 +18,23 @@ RUN echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu bionic main" > /etc/apt && apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C300EE8C \ && apt-get update \ && apt-get install -y curl zip unzip git supervisor sqlite3 \ - && apt-get install -y nginx php7.3-fpm php7.3-cli \ - php7.3-pgsql php7.3-sqlite3 php7.3-gd \ - php7.3-curl php7.3-memcached \ - php7.3-imap php7.3-mysql php7.3-mbstring \ - php7.3-xml php7.3-zip php7.3-bcmath php7.3-soap \ - php7.3-intl php7.3-readline php7.3-xdebug \ - php7.3-msgpack php7.3-igbinary php7.3-ldap \ + && apt-get install -y nginx php7.4-fpm php7.4-cli \ + php7.4-pgsql php7.4-sqlite3 php7.4-gd \ + php7.4-curl php7.4-memcached \ + php7.4-imap php7.4-mysql php7.4-mbstring \ + php7.4-xml php7.4-zip php7.4-bcmath php7.4-soap \ + php7.4-intl php7.4-readline php7.4-xdebug \ + php7.4-msgpack php7.4-igbinary php7.4-ldap \ php-redis \ && php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer \ && mkdir /run/php \ && apt-get -y autoremove \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \ - && sed -i "s/pm\.max_children = .*/pm.max_children = 20/" /etc/php/7.3/fpm/pool.d/www.conf \ - && sed -i "s/pm\.start_servers = .*/pm.start_servers = 10/" /etc/php/7.3/fpm/pool.d/www.conf \ - && sed -i "s/pm\.min_spare_servers = .*/pm.min_spare_servers = 5/" /etc/php/7.3/fpm/pool.d/www.conf \ - && sed -i "s/pm\.max_spare_servers = .*/pm.max_spare_servers = 10/" /etc/php/7.3/fpm/pool.d/www.conf \ + && sed -i "s/pm\.max_children = .*/pm.max_children = 20/" /etc/php/7.4/fpm/pool.d/www.conf \ + && sed -i "s/pm\.start_servers = .*/pm.start_servers = 10/" /etc/php/7.4/fpm/pool.d/www.conf \ + && sed -i "s/pm\.min_spare_servers = .*/pm.min_spare_servers = 5/" /etc/php/7.4/fpm/pool.d/www.conf \ + && sed -i "s/pm\.max_spare_servers = .*/pm.max_spare_servers = 10/" /etc/php/7.4/fpm/pool.d/www.conf \ && echo "daemon off;" >> /etc/nginx/nginx.conf RUN ln -sf /dev/stdout /var/log/nginx/access.log \ @@ -42,9 +42,9 @@ RUN ln -sf /dev/stdout /var/log/nginx/access.log \ COPY h5bp /etc/nginx/h5bp COPY default /etc/nginx/sites-available/default -COPY php-fpm.conf /etc/php/7.3/fpm/php-fpm.conf -COPY xdebug.ini /etc/php/7.3/mods-available/xdebug.ini -COPY vessel.ini /etc/php/7.3/fpm/conf.d/99-vessel.ini +COPY php-fpm.conf /etc/php/7.4/fpm/php-fpm.conf +COPY xdebug.ini /etc/php/7.4/mods-available/xdebug.ini +COPY vessel.ini /etc/php/7.4/fpm/conf.d/99-vessel.ini EXPOSE 80 diff --git a/docker-files/docker/app/default b/docker-files/docker/app/default index cad3921..73c287c 100644 --- a/docker-files/docker/app/default +++ b/docker-files/docker/app/default @@ -23,7 +23,7 @@ server { location ~ \.php$ { add_header X-Served-By Vessel; include snippets/fastcgi-php.conf; - fastcgi_pass unix:/run/php/php7.3-fpm.sock; + fastcgi_pass unix:/run/php/php7.4-fpm.sock; } error_page 404 /index.php; diff --git a/docker-files/docker/app/php-fpm.conf b/docker-files/docker/app/php-fpm.conf index 568865f..427766f 100644 --- a/docker-files/docker/app/php-fpm.conf +++ b/docker-files/docker/app/php-fpm.conf @@ -14,7 +14,7 @@ ; Pid file ; Note: the default prefix is /var ; Default Value: none -pid = /run/php/php7.3-fpm.pid +pid = /run/php/php7.4-fpm.pid ; Error log file ; If it's set to "syslog", log is sent to syslogd instead of being written @@ -122,7 +122,7 @@ daemonize = no ; Relative path can also be used. They will be prefixed by: ; - the global prefix if it's been set (-p argument) ; - /usr otherwise -include=/etc/php/7.3/fpm/pool.d/*.conf +include=/etc/php/7.4/fpm/pool.d/*.conf ; Clear environment in FPM workers. Prevents arbitrary environment variables from ; reaching FPM worker processes by clearing the environment in workers before env diff --git a/docker-files/docker/app/start-container b/docker-files/docker/app/start-container index edb7569..c29ac7d 100644 --- a/docker-files/docker/app/start-container +++ b/docker-files/docker/app/start-container @@ -1,11 +1,11 @@ #!/usr/bin/env bash -# Config /etc/php/7.3/mods-available/xdebug.ini -sed -i "s/xdebug\.remote_host\=.*/xdebug\.remote_host\=$XDEBUG_HOST/g" /etc/php/7.3/mods-available/xdebug.ini +# Config /etc/php/7.4/mods-available/xdebug.ini +sed -i "s/xdebug\.remote_host\=.*/xdebug\.remote_host\=$XDEBUG_HOST/g" /etc/php/7.4/mods-available/xdebug.ini # Run PHP-FPM as current user if [ ! -z "$WWWUSER" ]; then - sed -i "s/user\ \=.*/user\ \= $WWWUSER/g" /etc/php/7.3/fpm/pool.d/www.conf + sed -i "s/user\ \=.*/user\ \= $WWWUSER/g" /etc/php/7.4/fpm/pool.d/www.conf # Set UID of user "vessel" usermod -u $WWWUSER vessel diff --git a/docker-files/docker/app/supervisord.conf b/docker-files/docker/app/supervisord.conf index e7f213f..04c203b 100644 --- a/docker-files/docker/app/supervisord.conf +++ b/docker-files/docker/app/supervisord.conf @@ -9,7 +9,7 @@ stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 [program:php-fpm] -command=php-fpm7.3 +command=php-fpm7.4 stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr