add php ssdb extension

This commit is contained in:
Larry 2021-06-12 20:49:45 +08:00
parent ef1140dc4a
commit 898434b59e
5 changed files with 90 additions and 1 deletions

View File

@ -199,6 +199,7 @@ WORKSPACE_INSTALL_LNAV=false
WORKSPACE_INSTALL_PROTOC=false
WORKSPACE_INSTALL_PHPDECIMAL=false
WORKSPACE_INSTALL_ZOOKEEPER=false
WORKSPACE_INSTALL_SSDB=false
WORKSPACE_PROTOC_VERSION=latest
WORKSPACE_INSTALL_MEMCACHED=true
@ -262,6 +263,7 @@ PHP_FPM_INSTALL_MAILPARSE=false
PHP_FPM_INSTALL_WKHTMLTOPDF=false
PHP_FPM_INSTALL_PHPDECIMAL=false
PHP_FPM_INSTALL_ZOOKEEPER=false
PHP_FPM_INSTALL_SSDB=false
PHP_FPM_FFMPEG=false
PHP_FPM_AUDIOWAVEFORM=false
PHP_FPM_ADDITIONAL_LOCALES="en_US.UTF-8 es_ES.UTF-8 fr_FR.UTF-8"
@ -308,6 +310,7 @@ PHP_WORKER_INSTALL_GEARMAN=false
PHP_WORKER_INSTALL_REDIS=false
PHP_WORKER_INSTALL_IMAP=false
PHP_WORKER_INSTALL_XMLRPC=false
PHP_WORKER_INSTALL_SSDB=false
PHP_WORKER_PUID=1000
PHP_WORKER_PGID=1000

View File

@ -167,6 +167,7 @@ services:
- INSTALL_PROTOC=${WORKSPACE_INSTALL_PROTOC}
- INSTALL_PHPDECIMAL=${WORKSPACE_INSTALL_PHPDECIMAL}
- INSTALL_ZOOKEEPER=${WORKSPACE_INSTALL_ZOOKEEPER}
- INSTALL_SSDB=${WORKSPACE_INSTALL_SSDB}
- PROTOC_VERSION=${WORKSPACE_PROTOC_VERSION}
- INSTALL_DOCKER_CLIENT=${WORKSPACE_INSTALL_DOCKER_CLIENT}
- INSTALL_MEMCACHED=${WORKSPACE_INSTALL_MEMCACHED}
@ -267,6 +268,7 @@ services:
- INSTALL_XMLRPC=${PHP_FPM_INSTALL_XMLRPC}
- INSTALL_PHPDECIMAL=${PHP_FPM_INSTALL_PHPDECIMAL}
- INSTALL_ZOOKEEPER=${PHP_FPM_INSTALL_ZOOKEEPER}
- INSTALL_SSDB=${PHP_FPM_INSTALL_SSDB}
- DOWNGRADE_OPENSSL_TLS_AND_SECLEVEL=${PHP_DOWNGRADE_OPENSSL_TLS_AND_SECLEVEL}
- PUID=${PHP_FPM_PUID}
- PGID=${PHP_FPM_PGID}
@ -337,6 +339,7 @@ services:
- INSTALL_REDIS=${PHP_WORKER_INSTALL_REDIS}
- INSTALL_IMAP=${PHP_WORKER_INSTALL_IMAP}
- INSTALL_XMLRPC=${PHP_WORKER_INSTALL_XMLRPC}
- INSTALL_SSDB=${PHP_WORKER_INSTALL_SSDB}
- PUID=${PHP_WORKER_PUID}
- PGID=${PHP_WORKER_PGID}
- IMAGEMAGICK_VERSION=${PHP_WORKER_IMAGEMAGICK_VERSION}
@ -2003,4 +2006,4 @@ services:
ports:
- ${TARANTOOL_ADMIN_PORT}:80
networks:
- backend
- backend

View File

@ -1138,6 +1138,34 @@ RUN if [ ${NEW_RELIC} = true ]; then \
-e 's/;newrelic.daemon.start_timeout =.*/newrelic.daemon.start_timeout=5s/' \
/usr/local/etc/php/conf.d/newrelic.ini \
;fi
###########################################################################
# PHP SSDB:
###########################################################################
USER root
ARG INSTALL_SSDB=false
RUN set -xe; \
if [ ${INSTALL_SSDB} = true ] && [ $(php -r "echo PHP_MAJOR_VERSION;") != "8" ]; then \
apt-get -y install sudo wget && \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ]; then \
curl -L -o /tmp/ssdb-client-php.tar.gz https://github.com/jonnywang/phpssdb/archive/php7.tar.gz; \
else \
curl -L -o /tmp/ssdb-client-php.tar.gz https://github.com/jonnywang/phpssdb/archive/master.tar.gz; \
fi \
&& mkdir -p /tmp/ssdb-client-php \
&& tar -C /tmp/ssdb-client-php -zxvf /tmp/ssdb-client-php.tar.gz --strip 1 \
&& cd /tmp/ssdb-client-php \
&& phpize \
&& ./configure \
&& make \
&& make install \
&& rm /tmp/ssdb-client-php.tar.gz \
&& docker-php-ext-enable ssdb \
&& php -m | grep -r 'ssdb'; \
;fi
###########################################################################
# Downgrade Openssl:
###########################################################################

View File

@ -422,6 +422,34 @@ RUN if [ ${INSTALL_MEMCACHED} = true ]; then \
php -m | grep -r 'memcached'; \
fi
###########################################################################
# PHP SSDB:
###########################################################################
USER root
ARG INSTALL_SSDB=false
RUN set -xe; \
if [ ${INSTALL_SSDB} = true ] && [ $(php -r "echo PHP_MAJOR_VERSION;") != "8" ]; then \
apt-get -y install sudo wget && \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ]; then \
curl -L -o /tmp/ssdb-client-php.tar.gz https://github.com/jonnywang/phpssdb/archive/php7.tar.gz; \
else \
curl -L -o /tmp/ssdb-client-php.tar.gz https://github.com/jonnywang/phpssdb/archive/master.tar.gz; \
fi \
&& mkdir -p /tmp/ssdb-client-php \
&& tar -C /tmp/ssdb-client-php -zxvf /tmp/ssdb-client-php.tar.gz --strip 1 \
&& cd /tmp/ssdb-client-php \
&& phpize \
&& ./configure \
&& make \
&& make install \
&& rm /tmp/ssdb-client-php.tar.gz \
&& docker-php-ext-enable ssdb \
&& php -m | grep -r 'ssdb'; \
;fi
#
#--------------------------------------------------------------------------
# Optional Supervisord Configuration

View File

@ -1649,6 +1649,33 @@ RUN set -eux; \
php -m | grep -q 'zookeeper'; \
fi
###########################################################################
# PHP SSDB:
###########################################################################
USER root
ARG INSTALL_SSDB=false
RUN set -xe; \
if [ ${INSTALL_SSDB} = true ] && [ $(php -r "echo PHP_MAJOR_VERSION;") != "8" ]; then \
apt-get -y install sudo wget && \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ]; then \
curl -L -o /tmp/ssdb-client-php.tar.gz https://github.com/jonnywang/phpssdb/archive/php7.tar.gz; \
else \
curl -L -o /tmp/ssdb-client-php.tar.gz https://github.com/jonnywang/phpssdb/archive/master.tar.gz; \
fi \
&& mkdir -p /tmp/ssdb-client-php \
&& tar -C /tmp/ssdb-client-php -zxvf /tmp/ssdb-client-php.tar.gz --strip 1 \
&& cd /tmp/ssdb-client-php \
&& phpize \
&& ./configure \
&& make \
&& make install \
&& rm /tmp/ssdb-client-php.tar.gz \
&& docker-php-ext-enable ssdb \
&& php -m | grep -r 'ssdb'; \
;fi
#
#--------------------------------------------------------------------------
# Final Touch