bitpressio / docker-for-php-developers-errata

Reported errata for https://bitpress.io/docker-for-php-developers/
13 stars 0 forks source link

Laravel-07 Redis on Windows 10 #22

Open avrahamm opened 4 years ago

avrahamm commented 4 years ago

Hi Paul! I have followed the video, Redis is set properly inside docker container. Yet I couldn't run Redis client from Windows host to connect to the Redis client inside docker container, It just opens redis-cli Windows client, redis 127.0.0.1:6379> and is not reflected inside docker. I changed from 16379:6379 to 6379:6379 in docker-compose.yml, yet it didn't help. Any Idea to run it from Windows on 16379 as you do on Mac?

Thanks, Avraham

paulredmond commented 4 years ago

Hey 👋

Unless there's some weird port permissions issue with Windows, you should be able to specify the port like this from your Windows CLI (not inside a container):

redis-cli -h 127.0.0.1 -p 16379

That assumes you mapped port 16379 locally to 6379 in the redis container.

avrahamm commented 4 years ago

I needed to open terminal in Redis folder, ran redis-cli -h 127.0.0.1 -p 16379 and it worked. C:\Program Files\Redis>redis-cli -h 127.0.0.1 -p 16379 redis 127.0.0.1:16379>

I can't get 'test' variable set in Redis via redis-cli terminal, what's wrong?

Thanks!

paulredmond commented 4 years ago

I can't get 'test' variable set in Redis via redis-cli terminal, what's wrong?

Hmm, can you share your docker-compose.yml file with me?

avrahamm commented 4 years ago

version: "3" services: app: image: laravel-www container_name: laravel-www build: context: . dockerfile: docker/Dockerfile volumes:

volumes: mysql: driver: "local" redis: driver: "local"

avrahamm commented 4 years ago

docker-compose .yml.txt

avrahamm commented 4 years ago

Attached docker-compose.yml.txt as couldn't attach with .yml extension. Identation is correct as in your videos.

paulredmond commented 4 years ago

Hmm, everything looks correct, I am not sure why that's not working, unless your .env configuration is not matching?

avrahamm commented 4 years ago

Thanks, I will check again

On Mon, Mar 30, 2020 at 8:37 PM Paul Redmond notifications@github.com wrote:

Hmm, everything looks correct, I am not sure why that's not working, unless your .env configuration is not matching?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/bitpressio/docker-for-php-developers-errata/issues/22#issuecomment-606139828, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFMXRERY3AZAVI3IIUSMSV3RKDKFXANCNFSM4KBX2HPA .