-
Notifications
You must be signed in to change notification settings - Fork 775
Description
As originally discussed here. I was asked by @glours to open this separate issue to keep track of it.
@lonix wrote
Hi @ndeloof I was directed here from the blog post.
The blog states that the draft spec consists of actions: "sync" and "rebuild+recreate".
There is another action which just as important, and FAR simpler than those: "recreate only".
In a CI/CD environment:
- the new image will be built and uploaded to some registry
- the running app must then be restarted with the new version
- the app probably has the current version specified in
.env
ordocker-compose.yml
, so that file will be updated by the CD tooling - docker compose should simply detect that file was changed, and recreate the container... that's all!
I saw you going back and forth on this with some doubters in other threads. But this new watch experiment is a brilliant idea. Maybe consider this use case as the foot in the door - it's simple to explain and justify, and sorely needed. Doing CD with docker is hard, but a watch-restart feature would make it trivial.
Please consider giving us a "restart only" action - I would use it in production immediately and toss out half a dozen scripts and tools and kludges!
Thanks!
@nemchik wrote
There is another action which just as important, and FAR simpler than those: "restart only".
Just to clarify, you're looking for a watch with a pull and recreate, not just a restart, correct?
@lonix1 wrote
Yes, you are right, it's a pull + recreate - the equivalent of docker compose down && docker compose up
.
To eliminate all that stuff for a native and dead-simple docker compose watch feature would be a game changer. Complex CI/CD toolchains would be much shorter and easier to deploy and manage.