diff --git a/docker-compose.yml b/docker-compose.yml index e4a4fc4..07c47f6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -253,6 +253,7 @@ services: - INSTALL_MEMCACHED=${PHP_FPM_INSTALL_MEMCACHED} - INSTALL_SOCKETS=${LARAVEL_HORIZON_INSTALL_SOCKETS} - INSTALL_CASSANDRA=${PHP_FPM_INSTALL_CASSANDRA} + - INSTALL_PHPREDIS=${LARAVEL_HORIZON_INSTALL_PHPREDIS} volumes: - ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER} - ./laravel-horizon/supervisord.d:/etc/supervisord.d diff --git a/env-example b/env-example index 76a4af3..0fd9d9d 100644 --- a/env-example +++ b/env-example @@ -225,6 +225,7 @@ NGINX_SSL_PATH=./nginx/ssl/ ### LARAVEL_HORIZON ################################################ LARAVEL_HORIZON_INSTALL_SOCKETS=false +LARAVEL_HORIZON_INSTALL_PHPREDIS=true ### APACHE ################################################ diff --git a/laravel-horizon/Dockerfile b/laravel-horizon/Dockerfile index ee5b9ff..766b245 100644 --- a/laravel-horizon/Dockerfile +++ b/laravel-horizon/Dockerfile @@ -50,6 +50,15 @@ ARG INSTALL_CASSANDRA=false RUN if [ ${INSTALL_CASSANDRA} = true ]; then \ apk --update add cassandra-cpp-driver \ ;fi + +# Install PhpRedis package: +ARG INSTALL_PHPREDIS=false +RUN if [ ${INSTALL_PHPREDIS} = true ]; then \ + # Install Php Redis Extension + printf "\n" | pecl install -o -f redis \ + && rm -rf /tmp/pear \ + && docker-php-ext-enable redis \ +;fi WORKDIR /usr/src RUN if [ ${INSTALL_CASSANDRA} = true ]; then \