diff --git a/.env.example b/.env.example index 13b7ae8..69ea68b 100644 --- a/.env.example +++ b/.env.example @@ -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 diff --git a/docker-compose.yml b/docker-compose.yml index f28bc4c..10d3f43 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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 \ No newline at end of file + - backend diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index 8e76428..e321b81 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -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: ########################################################################### diff --git a/php-worker/Dockerfile b/php-worker/Dockerfile index b901770..ea86d5a 100644 --- a/php-worker/Dockerfile +++ b/php-worker/Dockerfile @@ -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 diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 64deb56..5dc435e 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -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