-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
removing _1 suffix #349
removing _1 suffix #349
Conversation
Interesting. I think I'm in favour, but I'd like to be sure we're not breaking anything major. A few things:
|
@@ -51,7 +51,7 @@ One-off commands are started in new containers with the same config as a normal | |||
|
|||
Links are also created between one-off commands and the other containers for that service so you can do stuff like this: | |||
|
|||
$ fig run db /bin/sh -c "psql -h \$DB_1_PORT_5432_TCP_ADDR -U docker" | |||
$ fig run db /bin/sh -c "psql -h \$DB_PORT_5432_TCP_ADDR -U docker" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Off-topic for this PR, but we should really change these docs to the much cleaner:
fig run db /bin/sh -c "psql -h db -U docker"
Also, the /bin/sh -c in this is redundant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/bin/sh -c
is necessary if it's using an environment variable, I think, but not if we switch to hostnames.
Yep, make the non-suffixed version an alias to the |
ping @bfirsh - any reckons? |
We should definitely still have I have conflicted feels about In terms of the bonkers environment variables, they are being improved in Docker itself. We shouldn't be using environment variables anyway... you can just reference hostname |
As raised in #229, |
@aanand I've been busy, but I'll do the fixes you mention |
@bfirsh I think the problem is that In short, this means that I will have to construct different containers if I scale up my application? I.e if I run a single instance, the db container will be accessible as It would make sense if I had two linked |
Fig supports scaling, so there should be a Let's move the hostname discussion to #360 |
undid changes to
|
Signed-off-by: Benjamin Eidelman <[email protected]>
+1 for a fast merge on this |
+1 |
When can we expect this to be pulled in? It's a life saver for me so a big +1 to this... |
👍 |
Thanks for the contribution @benjamine, but this has now been fixed in #364! |
Let me know if there's anything you think is still missing. |
coming from #342,
this will change container naming to avoid the
_1
suffix, the change will be:I updated all docs I found to reflect this. test
Signed-off-by: Benjamin Eidelman [email protected]