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

Non-numeric link alias #364

Merged
merged 3 commits into from
Sep 4, 2014
Merged

Non-numeric link alias #364

merged 3 commits into from
Sep 4, 2014

Conversation

aanand
Copy link

@aanand aanand commented Jul 29, 2014

Docs could use a once-over. Aside from the homepage quick start, I haven't yet gone through the tutorials to make sure they definitely still work.

@d11wtq
Copy link

d11wtq commented Aug 4, 2014

I've never actually tried getting a DB console that way. I create a second service called dbconsole with the appropriate command and fig run --rm dbconsole. It definitely is incorrect for a service to link to itself (it's not possible, at least for the first instance of the service). If fig run supported a --link command line option, this would be possible though. Here's what I do:

db:
  image: d11wtq/postgres

dbconsole:
  image: d11wtq/postgres
  links:
    - db:db
  environment:
    - PGPASSWORD=default
  command: psql -U default -h db

Then:

fig up -d db

fig run --rm dbconsole

I think it does make a some sense for service automagically to link to itself for all but the first instance though.

@d11wtq
Copy link

d11wtq commented Aug 4, 2014

Ah, just saw @aanand's comment. Sounds like that is already the behaviour, I just never knew!

@bfirsh
Copy link

bfirsh commented Aug 4, 2014

Run commands for services link to themselves. If the db service is running then fig run db ... should have a link called db_1.

@d11wtq
Copy link

d11wtq commented Aug 4, 2014

Yes, that is indeed useful, thanks. I'll still keep doing my dbconsole thing, just because it's easier to type, but self-linking is definitely a sensible default.

@aanand aanand changed the title WIP: Non-numeric link alias Non-numeric link alias Aug 6, 2014
@aanand
Copy link
Author

aanand commented Aug 8, 2014

Rebased onto #395.

@bfirsh
Copy link

bfirsh commented Sep 4, 2014

LGTM

bfirsh added a commit that referenced this pull request Sep 4, 2014
@bfirsh bfirsh merged commit 2827786 into master Sep 4, 2014
@bfirsh bfirsh deleted the non-numeric-link-alias branch September 4, 2014 19:39
@bfirsh bfirsh mentioned this pull request Sep 5, 2014
yuval-k pushed a commit to yuval-k/compose that referenced this pull request Apr 10, 2015
Non-numeric link alias
Signed-off-by: Yuval Kohavi <[email protected]>
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

Successfully merging this pull request may close these issues.

3 participants