Open avrahamm opened 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.
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 rebuild and run container, docker-compose build app docker-compose up -d
I set test variable, redis 127.0.0.1:16379> SET test 'testttt' OK redis 127.0.0.1:16379> GET test "testttt"
$ winpty docker-compose exec app bash root@0a9191fa58a4:/var/www/html# php artisan tinker Psy Shell v0.9.12 (PHP 7.2.26 — cli) by Justin Hileman
\Redis::get('test'); => null
I can't get 'test' variable set in Redis via redis-cli terminal, what's wrong?
Thanks!
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?
version: "3" services: app: image: laravel-www container_name: laravel-www build: context: . dockerfile: docker/Dockerfile volumes:
volumes: mysql: driver: "local" redis: driver: "local"
Attached docker-compose.yml.txt as couldn't attach with .yml extension. Identation is correct as in your videos.
Hmm, everything looks correct, I am not sure why that's not working, unless your .env
configuration is not matching?
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 .
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