Merge pull request #1219 from NickToony/master

Fixed: Missing PgSQL PDO drivers
This commit is contained in:
Mahmoud Zalt 2017-10-29 20:14:31 +02:00 committed by GitHub
commit 4e486280f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 30 additions and 3 deletions

View File

@ -541,11 +541,18 @@ b) add a new service container by simply copy-paste this section below PHP-FPM c
```yaml
php-worker:
build:
context: ./php-fpm
dockerfile: Dockerfile-70 # or Dockerfile-56, choose your PHP-FPM container setting
context: ./php-worker
dockerfile: "Dockerfile-${PHP_VERSION}" #Dockerfile-71 or #Dockerfile-70 available
args:
- INSTALL_PGSQL=${PHP_WORKER_INSTALL_PGSQL} #Optionally install PGSQL PHP drivers
volumes_from:
- applications
command: php artisan queue:work
depends_on:
- workspace
extra_hosts:
- "dockerhost:${DOCKER_HOST_IP}"
networks:
- backend
```
2 - Start everything up

View File

@ -112,6 +112,8 @@ services:
build:
context: ./php-worker
dockerfile: "Dockerfile-${PHP_VERSION}"
args:
- INSTALL_PGSQL=${PHP_WORKER_INSTALL_PGSQL}
volumes_from:
- applications
depends_on:

View File

@ -88,6 +88,10 @@ PHP_FPM_INSTALL_IMAGE_OPTIMIZERS=false
PHP_FPM_INSTALL_IMAGEMAGICK=false
PHP_FPM_INSTALL_PG_CLIENT=false
### PHP_WORKER #########################################################################################################
PHP_WORKER_INSTALL_PGSQL=false
### NGINX ##############################################################################################################
NGINX_HOST_HTTP_PORT=80

View File

@ -24,6 +24,13 @@ RUN apk --update add wget \
RUN docker-php-ext-install mysqli mbstring pdo pdo_mysql mcrypt tokenizer xml
RUN pecl channel-update pecl.php.net && pecl install memcached && docker-php-ext-enable memcached
# Install PostgreSQL drivers:
ARG INSTALL_PGSQL=false
RUN if [ ${INSTALL_PGSQL} = true ]; then \
apk --update add postgresql-dev \
&& docker-php-ext-install pdo_pgsql \
;fi
RUN rm /var/cache/apk/* \
&& mkdir -p /var/www

View File

@ -24,6 +24,13 @@ RUN apk --update add wget \
RUN docker-php-ext-install mysqli mbstring pdo pdo_mysql mcrypt tokenizer xml
RUN pecl channel-update pecl.php.net && pecl install memcached && docker-php-ext-enable memcached
# Install PostgreSQL drivers:
ARG INSTALL_PGSQL=false
RUN if [ ${INSTALL_PGSQL} = true ]; then \
apk --update add postgresql-dev \
&& docker-php-ext-install pdo_pgsql \
;fi
RUN rm /var/cache/apk/* \
&& mkdir -p /var/www