From 3d2f20f7b3211409c17ec866fddecd7a6309f629 Mon Sep 17 00:00:00 2001 From: Chris Fidao Date: Fri, 1 Dec 2017 09:01:01 -0600 Subject: [PATCH 1/4] updated to php7.2, minus xdebug --- docker-files/docker/app/Dockerfile | 11 ++++++----- docker-files/docker/app/default | 2 +- docker-files/docker/app/php-fpm.conf | 16 ++++++++-------- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/docker-files/docker/app/Dockerfile b/docker-files/docker/app/Dockerfile index 889b3c5..fa2f972 100644 --- a/docker-files/docker/app/Dockerfile +++ b/docker-files/docker/app/Dockerfile @@ -18,15 +18,16 @@ RUN set -x \ && gosu nobody true \ && apt-get purge -y --auto-remove ca-certificates wget +# Note: php7.2-xdebug not available yet! RUN echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu xenial main" > /etc/apt/sources.list.d/ppa_ondrej_php.list \ && echo "deb http://ppa.launchpad.net/nginx/development/ubuntu xenial main" > /etc/apt/sources.list.d/ppa_nginx_mainline.list \ && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E5267A6C \ && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C300EE8C \ && apt-get update \ && apt-get install -y curl zip unzip git supervisor sqlite3 \ - && apt-get install -y nginx php7.1-fpm php7.1-cli php7.1-mcrypt php7.1-gd php7.1-mysql \ - php7.1-pgsql php7.1-imap php-memcached php7.1-mbstring php7.1-xml php7.1-curl \ - php7.1-imagick php7.1-zip php7.1-bcmath php7.1-sqlite3 php7.1-xdebug \ + && apt-get install -y nginx php7.2-fpm php7.2-cli php7.2-sodium php7.2-gd php7.2-mysql \ + php7.2-pgsql php7.2-imap php7.2-memcached php7.2-mbstring php7.2-xml php7.2-curl \ + php7.2-imagick php7.2-zip php7.2-bcmath php7.2-sqlite3 \ && php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer \ && mkdir /run/php \ && apt-get -y autoremove \ @@ -39,8 +40,8 @@ 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.1/fpm/php-fpm.conf -COPY xdebug.ini /etc/php/7.1/mods-available/xdebug.ini +COPY php-fpm.conf /etc/php/7.2/fpm/php-fpm.conf +COPY xdebug.ini /etc/php/7.2/mods-available/xdebug.ini EXPOSE 80 diff --git a/docker-files/docker/app/default b/docker-files/docker/app/default index 0c16cd0..99b3ad2 100644 --- a/docker-files/docker/app/default +++ b/docker-files/docker/app/default @@ -21,7 +21,7 @@ server { location ~ \.php$ { add_header X-Served-By Vessel; include snippets/fastcgi-php.conf; - fastcgi_pass unix:/run/php/php7.1-fpm.sock; + fastcgi_pass unix:/run/php/php7.2-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 2c59d2e..c4b7cb2 100644 --- a/docker-files/docker/app/php-fpm.conf +++ b/docker-files/docker/app/php-fpm.conf @@ -14,11 +14,11 @@ ; Pid file ; Note: the default prefix is /var ; Default Value: none -pid = /run/php/php7.1-fpm.pid +pid = /run/php/php7.2-fpm.pid ; Error log file ; If it's set to "syslog", log is sent to syslogd instead of being written -; in a local file. +; into a local file. ; Note: the default prefix is /var ; Default Value: log/php-fpm.log error_log = /proc/self/fd/2 @@ -61,7 +61,7 @@ error_log = /proc/self/fd/2 ; Default Value: 0 ;process_control_timeout = 0 -; The maximum number of processes FPM will fork. This has been design to control +; The maximum number of processes FPM will fork. This has been designed to control ; the global number of processes when using dynamic PM within a lot of pools. ; Use it with caution. ; Note: A value of 0 indicates no limit @@ -69,10 +69,10 @@ error_log = /proc/self/fd/2 ; process.max = 128 ; Specify the nice(2) priority to apply to the master process (only if set) -; The value can vary from -19 (highest priority) to 20 (lower priority) +; The value can vary from -19 (highest priority) to 20 (lowest priority) ; Note: - It will only work if the FPM master process is launched as root ; - The pool process will inherit the master process priority -; unless it specified otherwise +; unless specified otherwise ; Default Value: no set ; process.priority = -19 @@ -99,8 +99,8 @@ daemonize = no ; Default Value: not set (auto detection) ;events.mechanism = epoll -; When FPM is build with systemd integration, specify the interval, -; in second, between health report notification to systemd. +; When FPM is built with systemd integration, specify the interval, +; in seconds, between health report notification to systemd. ; Set to 0 to disable. ; Available Units: s(econds), m(inutes), h(ours) ; Default Unit: seconds @@ -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.1/fpm/pool.d/*.conf +include=/etc/php/7.2/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 From cd35cc5b96754c293c0de7a249455f5d4922fe95 Mon Sep 17 00:00:00 2001 From: Chris Fidao Date: Fri, 1 Dec 2017 10:03:28 -0600 Subject: [PATCH 2/4] Further adjustments for php 7.1 --- README.md | 2 +- docker-files/docker/app/start-container | 6 +++--- docker-files/docker/app/supervisord.conf | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 215a6b2..83db899 100644 --- a/README.md +++ b/README.md @@ -155,7 +155,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.1 +* PHP 7.2 * 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/start-container b/docker-files/docker/app/start-container index 5726eee..50a0069 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.1/mods-available/xdebug.ini -sed -i "s/xdebug\.remote_host\=.*/xdebug\.remote_host\=$XDEBUG_HOST/g" /etc/php/7.1/mods-available/xdebug.ini +# Config /etc/php/7.2/mods-available/xdebug.ini +sed -i "s/xdebug\.remote_host\=.*/xdebug\.remote_host\=$XDEBUG_HOST/g" /etc/php/7.2/mods-available/xdebug.ini # Run PHP-FPM as current user if [ ! -z "$WWWUSER" ]; then - sed -i "s/user\ \=.*/user\ \= $WWWUSER/g" /etc/php/7.1/fpm/pool.d/www.conf + sed -i "s/user\ \=.*/user\ \= $WWWUSER/g" /etc/php/7.2/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 e07f737..e30e043 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.1 +command=php-fpm7.2 stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr From 948ff9075094024df7dcbb1e46f83a47a0157e4d Mon Sep 17 00:00:00 2001 From: Chris Fidao Date: Thu, 4 Jan 2018 09:08:00 -0600 Subject: [PATCH 3/4] Updated php7.2 to install correctly, with some extra packages --- docker-files/docker/app/Dockerfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docker-files/docker/app/Dockerfile b/docker-files/docker/app/Dockerfile index fa2f972..c6db69a 100644 --- a/docker-files/docker/app/Dockerfile +++ b/docker-files/docker/app/Dockerfile @@ -25,9 +25,12 @@ RUN echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu xenial main" > /etc/apt && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C300EE8C \ && apt-get update \ && apt-get install -y curl zip unzip git supervisor sqlite3 \ - && apt-get install -y nginx php7.2-fpm php7.2-cli php7.2-sodium php7.2-gd php7.2-mysql \ - php7.2-pgsql php7.2-imap php7.2-memcached php7.2-mbstring php7.2-xml php7.2-curl \ - php7.2-imagick php7.2-zip php7.2-bcmath php7.2-sqlite3 \ + && apt-get install -y nginx php7.2-fpm php7.2-cli \ + php7.2-pgsql php7.2-sqlite3 php7.2-gd \ + php7.2-curl php7.2-memcached \ + php7.2-imap php7.2-mysql php7.2-mbstring \ + php7.2-xml php7.2-zip php7.2-bcmath php7.2-soap \ + php7.2-intl php7.2-readline php-msgpack php-igbinary \ && php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer \ && mkdir /run/php \ && apt-get -y autoremove \ From 09a2b73899b3768aabd59df5552f52e9be5cb5cf Mon Sep 17 00:00:00 2001 From: Chris Fidao Date: Mon, 19 Feb 2018 07:19:40 -0600 Subject: [PATCH 4/4] xdebug now available --- docker-files/docker/app/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docker-files/docker/app/Dockerfile b/docker-files/docker/app/Dockerfile index fa2f972..e648f09 100644 --- a/docker-files/docker/app/Dockerfile +++ b/docker-files/docker/app/Dockerfile @@ -18,7 +18,6 @@ RUN set -x \ && gosu nobody true \ && apt-get purge -y --auto-remove ca-certificates wget -# Note: php7.2-xdebug not available yet! RUN echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu xenial main" > /etc/apt/sources.list.d/ppa_ondrej_php.list \ && echo "deb http://ppa.launchpad.net/nginx/development/ubuntu xenial main" > /etc/apt/sources.list.d/ppa_nginx_mainline.list \ && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E5267A6C \ @@ -27,7 +26,7 @@ RUN echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu xenial main" > /etc/apt && apt-get install -y curl zip unzip git supervisor sqlite3 \ && apt-get install -y nginx php7.2-fpm php7.2-cli php7.2-sodium php7.2-gd php7.2-mysql \ php7.2-pgsql php7.2-imap php7.2-memcached php7.2-mbstring php7.2-xml php7.2-curl \ - php7.2-imagick php7.2-zip php7.2-bcmath php7.2-sqlite3 \ + php7.2-imagick php7.2-zip php7.2-bcmath php7.2-sqlite3 php7.2-xdebug \ && php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer \ && mkdir /run/php \ && apt-get -y autoremove \