I'm using Laravel with docker and am new to installing redis. I've added redis locally via brew, and have it started up with redis-server. It's reporting initialized and ready to accept connections via tcp.
In Docker Compose, I've associated port 8002 with the redis port of 6379.
redis:
image: redis:alpine
container_name: my-redis
command: redis-server --appendonly yes
volumes:
- ./data/redis:/data
ports:
- "8002:6379"
In Laravel, I've changed my session driver to redis in my .env file, and for the database config, i've noted:
'redis' => [
'client' => env('REDIS_CLIENT', 'predis'),
'default' => [
'port' => env('REDIS_PORT', 6379),
'host' => env('REDIS_HOST', 'localhost'),
'password' => env('REDIS_PASSWORD', 'null'),
],
When I try to load the site, which is calling for the session, I'm getting Connection refused [tcp://127.0.0.1:8002]
I'm not sure if it matters, but you can see I'm trying to use predis as the client.
Any help would be appreciated!