Merge pull request #2286 from vlauciani/install_phpredis_in_laravel-horizon

Laravel-Horizon - In Laravel 6.0 'PhpRedis' is now default instead of 'predis'
This commit is contained in:
Shao Yu-Lung (Allen) 2019-09-19 09:20:38 +08:00 committed by GitHub
commit 1e668764fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 0 deletions

View File

@ -253,6 +253,7 @@ services:
- INSTALL_MEMCACHED=${PHP_FPM_INSTALL_MEMCACHED} - INSTALL_MEMCACHED=${PHP_FPM_INSTALL_MEMCACHED}
- INSTALL_SOCKETS=${LARAVEL_HORIZON_INSTALL_SOCKETS} - INSTALL_SOCKETS=${LARAVEL_HORIZON_INSTALL_SOCKETS}
- INSTALL_CASSANDRA=${PHP_FPM_INSTALL_CASSANDRA} - INSTALL_CASSANDRA=${PHP_FPM_INSTALL_CASSANDRA}
- INSTALL_PHPREDIS=${LARAVEL_HORIZON_INSTALL_PHPREDIS}
volumes: volumes:
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER} - ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
- ./laravel-horizon/supervisord.d:/etc/supervisord.d - ./laravel-horizon/supervisord.d:/etc/supervisord.d

View File

@ -225,6 +225,7 @@ NGINX_SSL_PATH=./nginx/ssl/
### LARAVEL_HORIZON ################################################ ### LARAVEL_HORIZON ################################################
LARAVEL_HORIZON_INSTALL_SOCKETS=false LARAVEL_HORIZON_INSTALL_SOCKETS=false
LARAVEL_HORIZON_INSTALL_PHPREDIS=true
### APACHE ################################################ ### APACHE ################################################

View File

@ -51,6 +51,15 @@ RUN if [ ${INSTALL_CASSANDRA} = true ]; then \
apk --update add cassandra-cpp-driver \ apk --update add cassandra-cpp-driver \
;fi ;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 WORKDIR /usr/src
RUN if [ ${INSTALL_CASSANDRA} = true ]; then \ RUN if [ ${INSTALL_CASSANDRA} = true ]; then \
git clone https://github.com/datastax/php-driver.git \ git clone https://github.com/datastax/php-driver.git \