Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up`dapr init` should start the Redis host even if a non-default host name is specified #418
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected Behavior
dapr initshould start the Redis host in a specific Docker network even when given a non-default host name.Actual Behavior
dapr initskips starting the Redis host if a non-default host name is specified (i.e. notlocalhost).Steps to Reproduce the Problem
DAPR_NETWORKtodapr-dev-containerDAPR_REDIS_HOSTtodapr_redisDAPR_PLACEMENT_HOSTtodapr_placementdapr initDapr will install (i.e. create the containers for) the placement host and the zipkin host, but skips the Redis host (warning that, due to the name being explicitly specified, it is expected to already be running).
The problem is that, when installed to a specific Docker network, the default Redis host name (i.e.
localhost) cannot be used as there is no mapping of ports back to a single machine running the Dapr application(s); the container running the Dapr applications is a just another peer of the Dapr runtime containers and, so, must use its real network name to connect to the Redis host.It looks like this change was added as part of #373 and breaks the "Dapr in VS Code Developer Container" templates (which spin up Dapr within a custom Docker network).
Is there a scenario where specifying a Redis host name itself implies that host is already running? Would it make sense to have a switch to tell
dapr initdefinitively to either start (or not start, whichever is most likely) the Redis host? Also, it would be helpful if theDAPR_REDIS_HOST, if set, also found its way into the network alias rather than always usingdapr_redis.