Merge pull request #3070 from bestlong/fix-3069

php7.0 mongodb fixed version number
This commit is contained in:
Shao Yu-Lung (Allen) 2021-10-08 00:07:51 +08:00 committed by GitHub
commit 8ddd12f94c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 42 additions and 23 deletions

View File

@ -44,6 +44,7 @@ jobs:
sed -i -- 's/AUDIOWAVEFORM=true/AUDIOWAVEFORM=false/g' .env sed -i -- 's/AUDIOWAVEFORM=true/AUDIOWAVEFORM=false/g' .env
sed -i -- 's/SSDB=true/SSDB=false/g' .env sed -i -- 's/SSDB=true/SSDB=false/g' .env
sed -i -- 's/ENCHANT=true/ENCHANT=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 build ${{ matrix.service }}
docker-compose up -d --no-deps -- ${{ matrix.service }} docker-compose up -d --no-deps -- ${{ matrix.service }}
docker-compose exec -T -- ${{ matrix.service }} php -m docker-compose exec -T -- ${{ matrix.service }} php -m

View File

@ -357,13 +357,19 @@ ARG INSTALL_MONGO=false
RUN if [ ${INSTALL_MONGO} = true ]; then \ RUN if [ ${INSTALL_MONGO} = true ]; then \
# Install the mongodb extension # Install the mongodb extension
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \ if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
pecl install mongo && \ pecl install mongo; \
docker-php-ext-enable mongo \ docker-php-ext-enable mongo; \
;else \ php -m | grep -oiE '^mongo$'; \
pecl install mongodb && \ else \
docker-php-ext-enable mongodb \ if [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "70000" ]; then \
;fi \ pecl install mongodb-1.9.2; \
;fi else \
pecl install mongodb; \
fi; \
docker-php-ext-enable mongodb; \
php -m | grep -oiE '^mongodb$'; \
fi; \
fi
########################################################################### ###########################################################################
# Xhprof: # Xhprof:

View File

@ -144,9 +144,15 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \ if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
pecl install mongo; \ pecl install mongo; \
docker-php-ext-enable 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 \ else \
pecl install mongodb; \ pecl install mongodb; \
fi; \
docker-php-ext-enable mongodb; \ docker-php-ext-enable mongodb; \
php -m | grep -oiE '^mongodb$'; \
fi; \ fi; \
fi fi

View File

@ -452,15 +452,21 @@ ARG INSTALL_MONGO=false
RUN if [ ${INSTALL_MONGO} = true ]; then \ RUN if [ ${INSTALL_MONGO} = true ]; then \
# Install the mongodb extension # Install the mongodb extension
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \ if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
pecl install mongo && \ pecl install mongo; \
echo "extension=mongo.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/mongo.ini && \ 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 \ ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/mongo.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/30-mongo.ini; \
;else \ php -m | grep -oiE '^mongo$'; \
pecl install mongodb && \ else \
echo "extension=mongodb.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/mongodb.ini && \ if [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "70000" ]; then \
ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/mongodb.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/30-mongodb.ini \ pecl install mongodb-1.9.2; \
;fi \ else \
;fi 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: # AMQP: