Skip to content

Commit c05c675

Browse files
authored
Merge pull request laradock#1201 from geraintdong/Add_pg_client_to_workspace_phpfpm
Add pg client to workspace phpfpm
2 parents 05879bd + 60998ed commit c05c675

11 files changed

Lines changed: 104 additions & 3 deletions

File tree

docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ services:
8080
- INSTALL_EXIF=${PHP_FPM_INSTALL_EXIF}
8181
- INSTALL_AEROSPIKE=${PHP_FPM_INSTALL_AEROSPIKE}
8282
- INSTALL_MYSQLI=${PHP_FPM_INSTALL_MYSQLI}
83+
- INSTALL_PGSQL=${PHP_FPM_INSTALL_PGSQL}
84+
- PHP_FPM_PG_CLIENT=${PHP_FPM_PG_CLIENT}
8385
- INSTALL_TOKENIZER=${PHP_FPM_INSTALL_TOKENIZER}
8486
- INSTALL_INTL=${PHP_FPM_INSTALL_INTL}
8587
- INSTALL_GHOSTSCRIPT=${PHP_FPM_INSTALL_GHOSTSCRIPT}

env-example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ WORKSPACE_NODE_VERSION=stable
6161
WORKSPACE_YARN_VERSION=latest
6262
WORKSPACE_TIMEZONE=UTC
6363
WORKSPACE_SSH_PORT=2222
64+
WORKSPACE_PG_CLIENT=true
6465

6566
### PHP_FPM ############################################################################################################
6667

@@ -76,6 +77,7 @@ PHP_FPM_INSTALL_OPCACHE=false
7677
PHP_FPM_INSTALL_EXIF=false
7778
PHP_FPM_INSTALL_AEROSPIKE=false
7879
PHP_FPM_INSTALL_MYSQLI=false
80+
PHP_FPM_INSTALL_PGSQL=false
7981
PHP_FPM_INSTALL_POSTGRES=false
8082
PHP_FPM_INSTALL_TOKENIZER=false
8183
PHP_FPM_INSTALL_INTL=false

php-fpm/Dockerfile-56

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,28 @@ RUN if [ ${INSTALL_SOAP} = true ]; then \
5050
docker-php-ext-install soap \
5151
;fi
5252

53+
#####################################
54+
# pgsql
55+
#####################################
56+
57+
ARG INSTALL_PGSQL=false
58+
RUN if [ ${INSTALL_PGSQL} = true ]; then \
59+
# Install the pgsql extension
60+
apt-get update -yqq && \
61+
docker-php-ext-install pgsql \
62+
;fi
63+
64+
#####################################
65+
# pgsql client
66+
#####################################
67+
68+
ARG PHP_FPM_PG_CLIENT=true
69+
RUN if [ ${PHP_FPM_PG_CLIENT} = true ]; then \
70+
# Install the pgsql clint
71+
apt-get update -yqq && \
72+
apt-get install -y postgresql-client \
73+
;fi
74+
5375
#####################################
5476
# xDebug:
5577
#####################################

php-fpm/Dockerfile-70

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,28 @@ RUN if [ ${INSTALL_SOAP} = true ]; then \
5050
docker-php-ext-install soap \
5151
;fi
5252

53+
#####################################
54+
# pgsql
55+
#####################################
56+
57+
ARG INSTALL_PGSQL=false
58+
RUN if [ ${INSTALL_PGSQL} = true ]; then \
59+
# Install the pgsql extension
60+
apt-get update -yqq && \
61+
docker-php-ext-install pgsql \
62+
;fi
63+
64+
#####################################
65+
# pgsql client
66+
#####################################
67+
68+
ARG PHP_FPM_PG_CLIENT=false
69+
RUN if [ ${PHP_FPM_PG_CLIENT} = true ]; then \
70+
# Install the pgsql client
71+
apt-get update -yqq && \
72+
apt-get install -y postgresql-client \
73+
;fi
74+
5375
#####################################
5476
# xDebug:
5577
#####################################

php-fpm/Dockerfile-71

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,28 @@ RUN if [ ${INSTALL_SOAP} = true ]; then \
5050
docker-php-ext-install soap \
5151
;fi
5252

53+
#####################################
54+
# pgsql
55+
#####################################
56+
57+
ARG INSTALL_PGSQL=false
58+
RUN if [ ${INSTALL_PGSQL} = true ]; then \
59+
# Install the pgsql extension
60+
apt-get update -yqq && \
61+
docker-php-ext-install pgsql \
62+
;fi
63+
64+
#####################################
65+
# pgsql client
66+
#####################################
67+
68+
ARG PHP_FPM_PG_CLIENT=false
69+
RUN if [ ${PHP_FPM_PG_CLIENT} = true ]; then \
70+
# Install the pgsql client
71+
apt-get update -yqq && \
72+
apt-get install -y postgresql-client \
73+
;fi
74+
5375
#####################################
5476
# xDebug:
5577
#####################################

php-fpm/php56.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1442,7 +1442,7 @@ session.save_handler = files
14421442
; where MODE is the octal representation of the mode. Note that this
14431443
; does not overwrite the process's umask.
14441444
; http://php.net/session.save-path
1445-
;session.save_path = "/tmp"
1445+
session.save_path = "/tmp"
14461446

14471447
; Whether to use strict session mode.
14481448
; Strict session mode does not accept uninitialized session ID and regenerate

php-fpm/php70.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1348,7 +1348,7 @@ session.save_handler = files
13481348
; where MODE is the octal representation of the mode. Note that this
13491349
; does not overwrite the process's umask.
13501350
; http://php.net/session.save-path
1351-
;session.save_path = "/tmp"
1351+
session.save_path = "/tmp"
13521352

13531353
; Whether to use strict session mode.
13541354
; Strict session mode does not accept uninitialized session ID and regenerate

php-fpm/php71.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1348,7 +1348,7 @@ session.save_handler = files
13481348
; where MODE is the octal representation of the mode. Note that this
13491349
; does not overwrite the process's umask.
13501350
; http://php.net/session.save-path
1351-
;session.save_path = "/tmp"
1351+
session.save_path = "/tmp"
13521352

13531353
; Whether to use strict session mode.
13541354
; Strict session mode does not accept uninitialized session ID and regenerate

workspace/Dockerfile-56

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,17 @@ RUN if [ ${INSTALL_TERRAFORM} = true ]; then \
525525
&& rm terraform_0.10.6_linux_amd64.zip \
526526
;fi
527527

528+
#####################################
529+
# pgsql client
530+
#####################################
531+
532+
ARG WORKSPACE_PG_CLIENT=false
533+
RUN if [ ${WORKSPACE_PG_CLIENT} = true ]; then \
534+
# Install the pgsql clint
535+
apt-get update -yqq && \
536+
apt-get -y install postgresql-client \
537+
;fi
538+
528539
#####################################
529540
# Dusk Dependencies:
530541
#####################################

workspace/Dockerfile-70

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,17 @@ RUN if [ ${INSTALL_TERRAFORM} = true ]; then \
618618
&& rm terraform_0.10.6_linux_amd64.zip \
619619
;fi
620620

621+
#####################################
622+
# pgsql client
623+
#####################################
624+
625+
ARG WORKSPACE_PG_CLIENT=false
626+
RUN if [ ${WORKSPACE_PG_CLIENT} = true ]; then \
627+
# Install the pgsql client
628+
apt-get update -yqq && \
629+
apt-get -y install postgresql-client \
630+
;fi
631+
621632
#####################################
622633
# Dusk Dependencies:
623634
#####################################

0 commit comments

Comments
 (0)