Browse Source

Merge pull request #2350 from walterjrp/patch-2

laravel-horizon support Install MongoDB drivers
Shao Yu-Lung (Allen) 5 years ago
parent
commit
b753c0580e
3 changed files with 8 additions and 0 deletions
  1. 1 0
      docker-compose.yml
  2. 1 0
      env-example
  3. 6 0
      laravel-horizon/Dockerfile

+ 1 - 0
docker-compose.yml

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

+ 1 - 0
env-example

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

+ 6 - 0
laravel-horizon/Dockerfile

@@ -74,6 +74,12 @@ RUN if [ ${INSTALL_CASSANDRA} = true ]; then \
   && docker-php-ext-enable cassandra \
 ;fi
 
+# Install MongoDB drivers:
+ARG INSTALL_MONGO=false
+RUN if [ ${INSTALL_MONGO} = true ]; then \
+  pecl install mongodb \
+  && docker-php-ext-enable mongodb \
+  ;fi
 
 
 ###########################################################################