Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Ability to rebuild and restart individual container, rather than entire stack #88

Open
joshfg opened this issue Aug 8, 2017 · 3 comments

Comments

@joshfg
Copy link

joshfg commented Aug 8, 2017

If I have a complex docker-compose.yml with a lot of services, it's a bit slow to have to run sbt dockerComposeStop dockerComposeUp every time I make a code change and want to update the container. I really want a command to just rebuild and restart the individual container corresponding to the project I'm working on, and not all the other services. e.g. something similar to docker-compose up -d --no-deps --build my-service. Is it possible to add support for this to sbt-docker-compose?

Also, what's the best way to use sbt-docker-compose with IntelliJ run configurations? Ideally I'd like a run configuration which just reloads an individual service/container if sbt dockerComposeUp has already been ran!

@yiming-li-tapad
Copy link
Collaborator

@joshfg We have been experimenting this feature already in our internal projects and I can personally tells you that it works pretty much as you described. Not only will it restart your built containers, but it will also restart any other dependent containers in your composed instances. For example, if you added a bunch of test data in your mysql DB and don't want to do a mass undo, you can simply restart the mysql container. I'll try to find time to port this feature to this repo.

Perhaps @kurtkopchik can help you with the second part of your question as I personally haven't used sbt-docker-compose in IntelliJ.

@joshfg
Copy link
Author

joshfg commented Aug 10, 2017

Thanks @yiming-li-tapad, that feature sounds great! It's been my only issue with the plugin, as it just seems inefficient to have to wait for compose to restart all containers, when only one has changed. Looking forward to trying it out!

@aaabramov
Copy link

Any ideas on this issue? It seems to be very useful.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants