Skip to content

Add Redis Container

ucan-lab edited this page May 13, 2020 · 14 revisions

infrastructure/docker-compose.yml

volumes:
  redis-store:
services:
  redis:
    image: redis:6.0-alpine
    volumes:
      - redis-store:/data

infrastructure/docker/php/Dockerfile

ENV REDIS_HOST=redis \
  CACHE_DRIVER=redis \
  SESSION_DRIVER=redis \
  QUEUE_DRIVER=redis

RUN git clone -b https://github.com/phpredis/phpredis.git /usr/src/php/ext/redis
RUN docker-php-ext-install redis
Clone this wiki locally