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

Service in extends option should be optional #1361

Closed
aanm opened this issue Apr 27, 2015 · 2 comments
Closed

Service in extends option should be optional #1361

aanm opened this issue Apr 27, 2015 · 2 comments

Comments

@aanm
Copy link

aanm commented Apr 27, 2015

I think it would be better if the service option to be optional.
compose would look through extends' file and find if there's a service with the same name of the service where the extends option is.

#docker-compose.yml
web:
  extends:
    file: common-services.yml
    #service: web
  environment:
    - DEBUG=1
  cpu_shares: 5
#common-services.yml
web:
  build: .
  ports:
    - "8000:8000"
  volumes:
    - "/data"
@dnephin
Copy link

dnephin commented Sep 29, 2015

I think that might be too magical for the extends feature. extends is designed to target a specific service, not assume that it's an override.

There is a new feature in master #2051 that works as a direct override (not targeting a specific service).

Does that work?

@aanm
Copy link
Author

aanm commented Sep 29, 2015

@dnephin Yes, I was looking for something similar to that.

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

No branches or pull requests

2 participants