Skip to content

Commit 1e66876

Browse files
authored
Merge pull request laradock#2286 from vlauciani/install_phpredis_in_laravel-horizon
Laravel-Horizon - In Laravel 6.0 'PhpRedis' is now default instead of 'predis'
2 parents 308f813 + 5dbd46f commit 1e66876

3 files changed

Lines changed: 11 additions & 0 deletions

File tree

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ services:
253253
- INSTALL_MEMCACHED=${PHP_FPM_INSTALL_MEMCACHED}
254254
- INSTALL_SOCKETS=${LARAVEL_HORIZON_INSTALL_SOCKETS}
255255
- INSTALL_CASSANDRA=${PHP_FPM_INSTALL_CASSANDRA}
256+
- INSTALL_PHPREDIS=${LARAVEL_HORIZON_INSTALL_PHPREDIS}
256257
volumes:
257258
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
258259
- ./laravel-horizon/supervisord.d:/etc/supervisord.d

env-example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ NGINX_SSL_PATH=./nginx/ssl/
225225
### LARAVEL_HORIZON ################################################
226226

227227
LARAVEL_HORIZON_INSTALL_SOCKETS=false
228+
LARAVEL_HORIZON_INSTALL_PHPREDIS=true
228229

229230
### APACHE ################################################
230231

laravel-horizon/Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,15 @@ ARG INSTALL_CASSANDRA=false
5050
RUN if [ ${INSTALL_CASSANDRA} = true ]; then \
5151
apk --update add cassandra-cpp-driver \
5252
;fi
53+
54+
# Install PhpRedis package:
55+
ARG INSTALL_PHPREDIS=false
56+
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
57+
# Install Php Redis Extension
58+
printf "\n" | pecl install -o -f redis \
59+
&& rm -rf /tmp/pear \
60+
&& docker-php-ext-enable redis \
61+
;fi
5362

5463
WORKDIR /usr/src
5564
RUN if [ ${INSTALL_CASSANDRA} = true ]; then \

0 commit comments

Comments
 (0)