-
Notifications
You must be signed in to change notification settings - Fork 379
Add Redis Container
ucan-lab edited this page Jul 16, 2020
·
14 revisions
volumes:
redis-store:
services:
redis:
image: redis:6.0-alpine
volumes:
- redis-store:/data
ENV REDIS_HOST=redis
ENV CACHE_DRIVER=redis
ENV SESSION_DRIVER=redis
ENV QUEUE_DRIVER=redis
RUN git clone https://github.com/phpredis/phpredis.git /usr/src/php/ext/redis
RUN docker-php-ext-install redis
$ make tinker
use Illuminate\Support\Facades\Redis;
Redis::set('name', 'hoge');
Redis::get('name');
$ docker-compose exec redis redis-cli
> flushall
OK
> set name "hoge"
OK
> get name
"hoge"