Browse Source

added redis

Bachir Soussi Chiadmi 10 months ago
parent
commit
aca469a6c9
2 changed files with 19 additions and 0 deletions
  1. 5 0
      Docker/php/Dockerfile
  2. 14 0
      docker-compose.yml

+ 5 - 0
Docker/php/Dockerfile

@@ -7,12 +7,17 @@ RUN apt-get update && apt-get install -y \
 		libjpeg62-turbo-dev \
     libmcrypt-dev \
 		libpng-dev \
+		mysql-client \
     zip && \
 		docker-php-ext-install -j$(nproc) iconv mcrypt && \
 		docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && \
 		docker-php-ext-install -j$(nproc) gd && \
 		docker-php-ext-install pdo_mysql zip && \
+		docker-php-ext-install opcache && \
 		apt-get install -y git vim && \
+		pecl install redis-3.1.0 && \
+    pecl install xdebug-2.5.0 && \
+    docker-php-ext-enable redis xdebug && \
 		export COMPOSER_HOME=/usr/local/composer && \
 	    curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \
 	    composer global require drush/drush:6.5.0 && \

+ 14 - 0
docker-compose.yml

@@ -23,16 +23,27 @@ services:
     ports:
       - 8983:8983
 
+  redis:
+    image: redis:3
+    volumes:
+      - redis-data:/data
+    networks:
+      - redis
+    ports:
+      - "6379"
+
   php:
     build: ./Docker/php/
     expose:
       - 9000
     volumes:
+      - php-root-data:/root
       - "${PROJECT_ROOT}:/var/www/html"
     networks:
       - database
       - server
       - solr
+      - redis
     depends_on:
       - mysql
       - solr
@@ -65,8 +76,11 @@ services:
 volumes:
     db-data:
     solr-cores:
+    redis-data:
+    php-root-data:
 
 networks:
     database:
     solr:
+    redis:
     server: