Skip to content

Commit 894b019

Browse files
author
Nick Hope
committed
Fixed: PHP-Worker has missing PGSQL drivers.
1 parent c2c30bf commit 894b019

4 files changed

Lines changed: 20 additions & 0 deletions

File tree

docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ services:
112112
build:
113113
context: ./php-worker
114114
dockerfile: "Dockerfile-${PHP_VERSION}"
115+
args:
116+
- INSTALL_PGSQL=${PHP_WORKER_INSTALL_PGSQL}
115117
volumes_from:
116118
- applications
117119
depends_on:

env-example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ PHP_FPM_INSTALL_IMAGE_OPTIMIZERS=false
8888
PHP_FPM_INSTALL_IMAGEMAGICK=false
8989
PHP_FPM_INSTALL_PG_CLIENT=false
9090

91+
### PHP_WORKER #########################################################################################################
92+
93+
PHP_WORKER_INSTALL_PGSQL=false
94+
9195
### NGINX ##############################################################################################################
9296

9397
NGINX_HOST_HTTP_PORT=80

php-worker/Dockerfile-70

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ RUN apk --update add wget \
2424
RUN docker-php-ext-install mysqli mbstring pdo pdo_mysql mcrypt tokenizer xml
2525
RUN pecl channel-update pecl.php.net && pecl install memcached && docker-php-ext-enable memcached
2626

27+
# Install PostgreSQL drivers:
28+
ARG INSTALL_PGSQL=false
29+
RUN if [ ${INSTALL_PGSQL} = true ]; then \
30+
apk --update add postgresql-dev \
31+
&& docker-php-ext-install pdo_pgsql \
32+
;fi
33+
2734
RUN rm /var/cache/apk/* \
2835
&& mkdir -p /var/www
2936

php-worker/Dockerfile-71

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ RUN apk --update add wget \
2424
RUN docker-php-ext-install mysqli mbstring pdo pdo_mysql mcrypt tokenizer xml
2525
RUN pecl channel-update pecl.php.net && pecl install memcached && docker-php-ext-enable memcached
2626

27+
# Install PostgreSQL drivers:
28+
ARG INSTALL_PGSQL=false
29+
RUN if [ ${INSTALL_PGSQL} = true ]; then \
30+
apk --update add postgresql-dev \
31+
&& docker-php-ext-install pdo_pgsql \
32+
;fi
33+
2734
RUN rm /var/cache/apk/* \
2835
&& mkdir -p /var/www
2936

0 commit comments

Comments
 (0)