No Redis included?
emergingdzns opened this issue · 2 comments
I see that there is configuration for Redis in the .env files but Redis doesn't appear to be part of the package. Is there a simple way to add this? I've added the predis/predis composer package but I don't think that it's installed.
We have REDIS in env file as example and you can see the same here - https://github.com/laravel/laravel/blob/9.x/.env.example. If you want to install REDIS maybe you can pay your attention to the example here - https://github.com/systemsdk/docker-symfony-api
@dimadeush That helped! In case anyone else wonders:
I resolved it by adding the docker/dev/redis files (Dockerfile and redis.conf) to my repo from the link provided above. Then I added the following lines to the .env files:
###> redis ###
REDIS_URL=redis://redis
###< redis ###
I then added the following to the yml files:
redis:
image: ${COMPOSE_PROJECT_NAME}-redis
container_name: ${COMPOSE_PROJECT_NAME}-redis
build:
context: ./docker/redis
restart: always
ports:
- "6379:6379"
volumes:
- ./var/redis:/data:delegated
networks:
- laravel
And finally in the laravel section of the yml files I added - redis
to the depends_on
section.