From 3cc917c9de7dd7735e86025a5b731f4331f42da7 Mon Sep 17 00:00:00 2001 From: Geraint Dong Date: Mon, 25 Sep 2017 17:30:30 +0700 Subject: [PATCH 1/5] Add Postgre SQL Support for php-fpm & edit webserver session storage location --- php-fpm/Dockerfile-56 | 11 +++++++++++ php-fpm/Dockerfile-70 | 11 +++++++++++ php-fpm/Dockerfile-71 | 11 +++++++++++ php-fpm/php56.ini | 2 +- php-fpm/php70.ini | 2 +- php-fpm/php71.ini | 2 +- 6 files changed, 36 insertions(+), 3 deletions(-) diff --git a/php-fpm/Dockerfile-56 b/php-fpm/Dockerfile-56 index ed8cb89..057db07 100644 --- a/php-fpm/Dockerfile-56 +++ b/php-fpm/Dockerfile-56 @@ -50,6 +50,17 @@ RUN if [ ${INSTALL_SOAP} = true ]; then \ docker-php-ext-install soap \ ;fi +##################################### +# pgsql +##################################### + +ARG INSTALL_PGSQL=false +RUN if [ ${INSTALL_PGSQL} = true ]; then \ + # Install the pgsql extension + apt-get update -yqq && \ + docker-php-ext-install pgsql \ +;fi + ##################################### # xDebug: ##################################### diff --git a/php-fpm/Dockerfile-70 b/php-fpm/Dockerfile-70 index daf214a..7543524 100644 --- a/php-fpm/Dockerfile-70 +++ b/php-fpm/Dockerfile-70 @@ -50,6 +50,17 @@ RUN if [ ${INSTALL_SOAP} = true ]; then \ docker-php-ext-install soap \ ;fi +##################################### +# pgsql +##################################### + +ARG INSTALL_PGSQL=false +RUN if [ ${INSTALL_PGSQL} = true ]; then \ + # Install the pgsql extension + apt-get update -yqq && \ + docker-php-ext-install pgsql \ +;fi + ##################################### # xDebug: ##################################### diff --git a/php-fpm/Dockerfile-71 b/php-fpm/Dockerfile-71 index 1210f29..a9da395 100644 --- a/php-fpm/Dockerfile-71 +++ b/php-fpm/Dockerfile-71 @@ -50,6 +50,17 @@ RUN if [ ${INSTALL_SOAP} = true ]; then \ docker-php-ext-install soap \ ;fi +##################################### +# pgsql +##################################### + +ARG INSTALL_PGSQL=false +RUN if [ ${INSTALL_PGSQL} = true ]; then \ + # Install the pgsql extension + apt-get update -yqq && \ + docker-php-ext-install pgsql \ +;fi + ##################################### # xDebug: ##################################### diff --git a/php-fpm/php56.ini b/php-fpm/php56.ini index a455b17..c644bee 100644 --- a/php-fpm/php56.ini +++ b/php-fpm/php56.ini @@ -1442,7 +1442,7 @@ session.save_handler = files ; where MODE is the octal representation of the mode. Note that this ; does not overwrite the process's umask. ; http://php.net/session.save-path -;session.save_path = "/tmp" +session.save_path = "/tmp" ; Whether to use strict session mode. ; Strict session mode does not accept uninitialized session ID and regenerate diff --git a/php-fpm/php70.ini b/php-fpm/php70.ini index c8242dc..53e3a4f 100644 --- a/php-fpm/php70.ini +++ b/php-fpm/php70.ini @@ -1348,7 +1348,7 @@ session.save_handler = files ; where MODE is the octal representation of the mode. Note that this ; does not overwrite the process's umask. ; http://php.net/session.save-path -;session.save_path = "/tmp" +session.save_path = "/tmp" ; Whether to use strict session mode. ; Strict session mode does not accept uninitialized session ID and regenerate diff --git a/php-fpm/php71.ini b/php-fpm/php71.ini index c8242dc..53e3a4f 100644 --- a/php-fpm/php71.ini +++ b/php-fpm/php71.ini @@ -1348,7 +1348,7 @@ session.save_handler = files ; where MODE is the octal representation of the mode. Note that this ; does not overwrite the process's umask. ; http://php.net/session.save-path -;session.save_path = "/tmp" +session.save_path = "/tmp" ; Whether to use strict session mode. ; Strict session mode does not accept uninitialized session ID and regenerate From 8f7b1b7e9feb79408d9d1d706c56aaf3cba435d8 Mon Sep 17 00:00:00 2001 From: Geraint Dong Date: Mon, 25 Sep 2017 18:31:16 +0700 Subject: [PATCH 2/5] Add Postgre SQL Support for php-fpm & edit webserver session storage location + Fix bug --- docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yml b/docker-compose.yml index 1940b86..2aa4110 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -77,6 +77,7 @@ services: - INSTALL_EXIF=${PHP_FPM_INSTALL_EXIF} - INSTALL_AEROSPIKE=${PHP_FPM_INSTALL_AEROSPIKE} - INSTALL_MYSQLI=${PHP_FPM_INSTALL_MYSQLI} + - INSTALL_PGSQL=${PHP_FPM_INSTALL_PGSQL} - INSTALL_TOKENIZER=${PHP_FPM_INSTALL_TOKENIZER} - INSTALL_INTL=${PHP_FPM_INSTALL_INTL} - INSTALL_GHOSTSCRIPT=${PHP_FPM_INSTALL_GHOSTSCRIPT} From ca9c07eb7697419e558bc61e6d40f365ad564321 Mon Sep 17 00:00:00 2001 From: Geraint Dong Date: Mon, 25 Sep 2017 18:40:47 +0700 Subject: [PATCH 3/5] Add Postgre SQL Support for php-fpm & edit webserver session storage location + Add sample config --- env-example | 1 + 1 file changed, 1 insertion(+) diff --git a/env-example b/env-example index b026ae7..f860969 100644 --- a/env-example +++ b/env-example @@ -73,6 +73,7 @@ PHP_FPM_INSTALL_OPCACHE=false PHP_FPM_INSTALL_EXIF=false PHP_FPM_INSTALL_AEROSPIKE=false PHP_FPM_INSTALL_MYSQLI=false +PHP_FPM_INSTALL_PGSQL=false PHP_FPM_INSTALL_TOKENIZER=false PHP_FPM_INSTALL_INTL=false PHP_FPM_INSTALL_GHOSTSCRIPT=false From ee03bb607fb4650dee55f5d0602d63950cd0792f Mon Sep 17 00:00:00 2001 From: Geraint Dong Date: Wed, 18 Oct 2017 10:04:23 +0700 Subject: [PATCH 4/5] Add support for pgclient to workspace & php-fpm --- docker-compose.yml | 1 + php-fpm/Dockerfile-56 | 11 +++++++++++ php-fpm/Dockerfile-70 | 11 +++++++++++ php-fpm/Dockerfile-71 | 11 +++++++++++ workspace/Dockerfile-56 | 11 +++++++++++ workspace/Dockerfile-70 | 11 +++++++++++ workspace/Dockerfile-71 | 9 +++++++++ 7 files changed, 65 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 2aa4110..abecd82 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -78,6 +78,7 @@ services: - INSTALL_AEROSPIKE=${PHP_FPM_INSTALL_AEROSPIKE} - INSTALL_MYSQLI=${PHP_FPM_INSTALL_MYSQLI} - INSTALL_PGSQL=${PHP_FPM_INSTALL_PGSQL} + - PHP_FPM_PG_CLIENT=${PHP_FPM_PG_CLIENT} - INSTALL_TOKENIZER=${PHP_FPM_INSTALL_TOKENIZER} - INSTALL_INTL=${PHP_FPM_INSTALL_INTL} - INSTALL_GHOSTSCRIPT=${PHP_FPM_INSTALL_GHOSTSCRIPT} diff --git a/php-fpm/Dockerfile-56 b/php-fpm/Dockerfile-56 index 057db07..057553b 100644 --- a/php-fpm/Dockerfile-56 +++ b/php-fpm/Dockerfile-56 @@ -61,6 +61,17 @@ RUN if [ ${INSTALL_PGSQL} = true ]; then \ docker-php-ext-install pgsql \ ;fi +##################################### +# pgsql client +##################################### + +ARG PHP_FPM_PG_CLIENT=true +RUN if [ ${PHP_FPM_PG_CLIENT} = true ]; then \ + # Install the pgsql clint + apt-get update -yqq && \ + apt-get install -y postgresql-client \ +;fi + ##################################### # xDebug: ##################################### diff --git a/php-fpm/Dockerfile-70 b/php-fpm/Dockerfile-70 index 7543524..96b980f 100644 --- a/php-fpm/Dockerfile-70 +++ b/php-fpm/Dockerfile-70 @@ -61,6 +61,17 @@ RUN if [ ${INSTALL_PGSQL} = true ]; then \ docker-php-ext-install pgsql \ ;fi +##################################### +# pgsql client +##################################### + +ARG PHP_FPM_PG_CLIENT=false +RUN if [ ${PHP_FPM_PG_CLIENT} = true ]; then \ + # Install the pgsql client + apt-get update -yqq && \ + apt-get install -y postgresql-client \ +;fi + ##################################### # xDebug: ##################################### diff --git a/php-fpm/Dockerfile-71 b/php-fpm/Dockerfile-71 index a9da395..02c1a36 100644 --- a/php-fpm/Dockerfile-71 +++ b/php-fpm/Dockerfile-71 @@ -61,6 +61,17 @@ RUN if [ ${INSTALL_PGSQL} = true ]; then \ docker-php-ext-install pgsql \ ;fi +##################################### +# pgsql client +##################################### + +ARG PHP_FPM_PG_CLIENT=false +RUN if [ ${PHP_FPM_PG_CLIENT} = true ]; then \ + # Install the pgsql client + apt-get update -yqq && \ + apt-get install -y postgresql-client \ +;fi + ##################################### # xDebug: ##################################### diff --git a/workspace/Dockerfile-56 b/workspace/Dockerfile-56 index a388552..47c56f1 100644 --- a/workspace/Dockerfile-56 +++ b/workspace/Dockerfile-56 @@ -524,6 +524,17 @@ RUN if [ ${INSTALL_TERRAFORM} = true ]; then \ && rm terraform_0.10.6_linux_amd64.zip \ ;fi +##################################### +# pgsql client +##################################### + +ARG WORKSPACE_PG_CLIENT=false +RUN if [ ${WORKSPACE_PG_CLIENT} = true ]; then \ + # Install the pgsql clint + apt-get update -yqq && \ + apt-get -y install postgresql-client \ +;fi + # #-------------------------------------------------------------------------- # Final Touch diff --git a/workspace/Dockerfile-70 b/workspace/Dockerfile-70 index 297d26d..d3a17f5 100644 --- a/workspace/Dockerfile-70 +++ b/workspace/Dockerfile-70 @@ -605,6 +605,17 @@ RUN if [ ${INSTALL_TERRAFORM} = true ]; then \ && rm terraform_0.10.6_linux_amd64.zip \ ;fi +##################################### +# pgsql client +##################################### + +ARG WORKSPACE_PG_CLIENT=false +RUN if [ ${WORKSPACE_PG_CLIENT} = true ]; then \ + # Install the pgsql client + apt-get update -yqq && \ + apt-get -y install postgresql-client \ +;fi + # #-------------------------------------------------------------------------- # Final Touch diff --git a/workspace/Dockerfile-71 b/workspace/Dockerfile-71 index a57bff6..87f1dc6 100644 --- a/workspace/Dockerfile-71 +++ b/workspace/Dockerfile-71 @@ -610,6 +610,15 @@ RUN if [ ${INSTALL_TERRAFORM} = true ]; then \ && mv terraform /usr/local/bin \ && rm terraform_0.10.6_linux_amd64.zip \ ;fi +##################################### +# pgsql client +##################################### +ARG WORKSPACE_PG_CLIENT=false +RUN if [ ${WORKSPACE_PG_CLIENT} = true ]; then \ + # Install the pgsql clint + apt-get update -yqq && \ + apt-get -y install postgresql-client \ +;fi # #-------------------------------------------------------------------------- From 7fb00658cf2f24c5c40250e77fd0b62a122b2a39 Mon Sep 17 00:00:00 2001 From: Geraint Dong Date: Wed, 18 Oct 2017 10:18:23 +0700 Subject: [PATCH 5/5] Add support for pgclient to workspace & php-fpm + Update sample .env file --- env-example | 1 + 1 file changed, 1 insertion(+) diff --git a/env-example b/env-example index f860969..d2c819e 100644 --- a/env-example +++ b/env-example @@ -58,6 +58,7 @@ WORKSPACE_NODE_VERSION=stable WORKSPACE_YARN_VERSION=latest WORKSPACE_TIMEZONE=UTC WORKSPACE_SSH_PORT=2222 +WORKSPACE_PG_CLIENT=true ### PHP_FPM ############################################################################################################