Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Redis included? #42

Closed
emergingdzns opened this issue Feb 7, 2023 · 2 comments
Closed

No Redis included? #42

emergingdzns opened this issue Feb 7, 2023 · 2 comments

Comments

@emergingdzns
Copy link

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.

@dimadeush
Copy link
Collaborator

dimadeush commented Feb 8, 2023

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

@emergingdzns
Copy link
Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants