From 032e7c0c534c7cc9620b9ba9b0e9e289f5ea57e4 Mon Sep 17 00:00:00 2001 From: Robert Trzebinski Date: Tue, 21 Jul 2020 16:45:21 +0200 Subject: [PATCH 1/2] Add rdkafka to Workspace container --- docker-compose.yml | 1 + env-example | 1 + workspace/Dockerfile | 14 ++++++++++++++ 3 files changed, 16 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 4dd89df..98efe1a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -131,6 +131,7 @@ services: - INSTALL_FSWATCH=${WORKSPACE_INSTALL_FSWATCH} - INSTALL_AST=${WORKSPACE_INSTALL_AST} - INSTALL_YAML=${WORKSPACE_INSTALL_YAML} + - INSTALL_RDKAFKA=${WORKSPACE_INSTALL_RDKAFKA} - INSTALL_MAILPARSE=${WORKSPACE_INSTALL_MAILPARSE} - INSTALL_GIT_PROMPT=${WORKSPACE_INSTALL_GIT_PROMPT} - INSTALL_XMLRPC=${WORKSPACE_INSTALL_XMLRPC} diff --git a/env-example b/env-example index ef13d64..42e2e09 100644 --- a/env-example +++ b/env-example @@ -158,6 +158,7 @@ WORKSPACE_INSTALL_SSHPASS=false WORKSPACE_INSTALL_INOTIFY=false WORKSPACE_INSTALL_FSWATCH=false WORKSPACE_INSTALL_YAML=false +WORKSPACE_INSTALL_RDKAFKA=false WORKSPACE_INSTALL_MAILPARSE=false WORKSPACE_INSTALL_XMLRPC=false WORKSPACE_PUID=1000 diff --git a/workspace/Dockerfile b/workspace/Dockerfile index f2694c4..f65ea45 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -1265,6 +1265,20 @@ RUN if [ ${INSTALL_YAML} = true ]; then \ ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/yaml.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/35-yaml.ini \ ;fi +########################################################################### +# RDKAFKA: +########################################################################### + +ARG INSTALL_RDKAFKA=false + +RUN if [ ${INSTALL_RDKAFKA} = true ]; then \ + apt-get install -y librdkafka-dev && \ + pecl install rdkafka && \ + echo "extension=rdkafka.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/rdkafka.ini && \ + ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/rdkafka.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/20-rdkafka.ini \ + && php -m | grep -q 'rdkafka' \ +;fi + ########################################################################### # FFMpeg: ########################################################################### From a95335585004c9c8f9b3f771c1bc41fcde3b95f9 Mon Sep 17 00:00:00 2001 From: Robert Trzebinski Date: Tue, 21 Jul 2020 16:53:13 +0200 Subject: [PATCH 2/2] add documentation about installing RDKAFKA extension --- DOCUMENTATION/content/documentation/index.md | 26 ++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/DOCUMENTATION/content/documentation/index.md b/DOCUMENTATION/content/documentation/index.md index d711991..88d292e 100644 --- a/DOCUMENTATION/content/documentation/index.md +++ b/DOCUMENTATION/content/documentation/index.md @@ -2197,6 +2197,32 @@ YAML PHP extension allows you to easily parse and create YAML structured data. I 4 - Re-build the container `docker-compose build php-fpm`
+
+ +## Install RDKAFKA extension in php-fpm + +1 - Open the `.env` file +
+2 - Search for the `PHP_FPM_INSTALL_RDKAFKA` argument under the PHP-FPM container +
+3 - Set it to `true` +
+4 - Re-build the container `docker-compose build php-fpm`
+ + +
+ +## Install RDKAFKA extension in workspace + +This is needed for 'composer install' if your dependencies require Kafka. + +1 - Open the `.env` file +
+2 - Search for the `WORKSPACE_INSTALL_RDKAFKA` argument under the WORKSPACE container +
+3 - Set it to `true` +
+4 - Re-build the container `docker-compose build workspace`