Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation should recommend to use hostnames for links #360

Closed
bfirsh opened this issue Jul 28, 2014 · 6 comments
Closed

Documentation should recommend to use hostnames for links #360

bfirsh opened this issue Jul 28, 2014 · 6 comments

Comments

@bfirsh
Copy link

bfirsh commented Jul 28, 2014

redis = Redis(
    host=os.environ.get('REDIS_1_PORT_6379_TCP_ADDR'),
    port=int(os.environ.get('REDIS_1_PORT_6379_TCP_PORT'))
)

This is bonkers. We should do this instead:

redis = Redis(host="redis-1", port="6379")
@bfirsh
Copy link
Author

bfirsh commented Jul 28, 2014

Blocked by #229 and moby/moby#6270.

@aanand
Copy link

aanand commented Jul 28, 2014

If we add a non-numeric link alias as discussed in #37, this doesn't block on anything.

@bfirsh
Copy link
Author

bfirsh commented Jul 28, 2014

Also discussed in #349.

Alright, let's do that.

@d11wtq
Copy link

d11wtq commented Jul 29, 2014

If you link with redis:redis, then it is simplified to:

redis = Redis(host="redis", port="6379")

This should probably be a default too, since that "alias" is just internal to the container linking to it.

@aanand
Copy link

aanand commented Jul 29, 2014

Yeah, redis should be equivalent to redis:redis. Working on a PR now.

aanand added a commit that referenced this issue Jul 29, 2014
@bfirsh
Copy link
Author

bfirsh commented Sep 11, 2014

fixed in #364

@bfirsh bfirsh closed this as completed Sep 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants