diff --git a/.github/workflows/main-ci.yml b/.github/workflows/main-ci.yml index 97a324c..6721cc7 100644 --- a/.github/workflows/main-ci.yml +++ b/.github/workflows/main-ci.yml @@ -44,6 +44,7 @@ jobs: sed -i -- 's/AUDIOWAVEFORM=true/AUDIOWAVEFORM=false/g' .env sed -i -- 's/SSDB=true/SSDB=false/g' .env sed -i -- 's/ENCHANT=true/ENCHANT=false/g' .env + sed -i -- 's/PG_CLIENT=true/PG_CLIENT=false/g' .env docker-compose build ${{ matrix.service }} docker-compose up -d --no-deps -- ${{ matrix.service }} docker-compose exec -T -- ${{ matrix.service }} php -m diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index 4650366..1f99e72 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -357,13 +357,19 @@ ARG INSTALL_MONGO=false RUN if [ ${INSTALL_MONGO} = true ]; then \ # Install the mongodb extension if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \ - pecl install mongo && \ - docker-php-ext-enable mongo \ - ;else \ - pecl install mongodb && \ - docker-php-ext-enable mongodb \ - ;fi \ -;fi + pecl install mongo; \ + docker-php-ext-enable mongo; \ + php -m | grep -oiE '^mongo$'; \ + else \ + if [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "70000" ]; then \ + pecl install mongodb-1.9.2; \ + else \ + pecl install mongodb; \ + fi; \ + docker-php-ext-enable mongodb; \ + php -m | grep -oiE '^mongodb$'; \ + fi; \ +fi ########################################################################### # Xhprof: diff --git a/php-worker/Dockerfile b/php-worker/Dockerfile index 8dabe29..0f6335d 100644 --- a/php-worker/Dockerfile +++ b/php-worker/Dockerfile @@ -141,13 +141,19 @@ RUN if [ ${INSTALL_SOAP} = true ]; then \ # Install MongoDB drivers: ARG INSTALL_MONGO=false RUN if [ ${INSTALL_MONGO} = true ]; then \ - if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \ - pecl install mongo; \ - docker-php-ext-enable mongo; \ - else \ - pecl install mongodb; \ - docker-php-ext-enable mongodb; \ - fi; \ + if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \ + pecl install mongo; \ + docker-php-ext-enable mongo; \ + php -m | grep -oiE '^mongo$'; \ + else \ + if [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "70000" ]; then \ + pecl install mongodb-1.9.2; \ + else \ + pecl install mongodb; \ + fi; \ + docker-php-ext-enable mongodb; \ + php -m | grep -oiE '^mongodb$'; \ + fi; \ fi ########################################################################### diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 1d525c4..092e711 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -452,15 +452,21 @@ ARG INSTALL_MONGO=false RUN if [ ${INSTALL_MONGO} = true ]; then \ # Install the mongodb extension if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \ - pecl install mongo && \ - echo "extension=mongo.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/mongo.ini && \ - ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/mongo.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/30-mongo.ini \ - ;else \ - pecl install mongodb && \ - echo "extension=mongodb.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/mongodb.ini && \ - ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/mongodb.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/30-mongodb.ini \ - ;fi \ -;fi + pecl install mongo; \ + echo "extension=mongo.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/mongo.ini; \ + ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/mongo.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/30-mongo.ini; \ + php -m | grep -oiE '^mongo$'; \ + else \ + if [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "70000" ]; then \ + pecl install mongodb-1.9.2; \ + else \ + pecl install mongodb; \ + fi; \ + echo "extension=mongodb.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/mongodb.ini; \ + ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/mongodb.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/30-mongodb.ini; \ + php -m | grep -oiE '^mongodb$'; \ + fi; \ +fi ########################################################################### # AMQP: