Redis port does not need to be published
See original GitHub issueDescription
Is there a reason to publish redis service port ? It seems to me that publishing it in docker-stack.yml is unecessary (redis is accessed internally in the swarm by other services). When deploying the stack, one can see the published port and try to access it from a web browser but will have the following message which can be confusing :
-ERR wrong number of arguments for 'get' command
Steps to reproduce the issue, if relevant:
- deploy the stack
- open http://<host_ip>:<redis_published_port>
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Redis docker not available on localhost of docker-compose
The problem is that your application container is using localhost as the hostname for connecting to the redis container. It should be using ......
Read more >Redis CLI
Host, port, password, and database. By default, redis-cli connects to the server at the address 127.0.0.1 with port 6379. You can change the...
Read more >I'm wondering if I found a bug with Laravel Redis, I'm doing ...
I'm using Redis pub/sub with Laravel 8 Sail to communicate with a node server that isn't added to the docker.yaml and not launched...
Read more >Configure the Redis output | Journalbeat Reference [7.15]
If one server becomes unreachable, the events are distributed to the reachable servers only. You can define each Redis server by specifying HOST...
Read more >Spring Data Redis
One of the first tasks when using Redis and Spring is to connect to the store through the IoC container. To do that,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You’r right, redis does not need to be published as it’s only used internally by the vote and worker services.
Quick note regarding your example:
Be careful, redis does not expose a http endpoint but a tcp one, if you use a redis client you will be able to connect to the redis service from the outside. Below and nxample when running the stack on play-with-docker.com:
Note: as no host port is provided in the redis service, the first one of the range (30000) is mapped to 6379.
Can someone provide a PR for me? There are several compose/stack files, and a kube deployment file.