Deploy new image in Docker Compose stack without downtime

Viewed 2459

We have a multi-container application, which uses a microservices architecture, running in Docker Compose.

When I make code changes to the web app, for example, I need to rebuild the image with new code, then run it again in my compose stack, without any downtime.

Here is the current sequence of events that we are using:

  1. Make changes to app code
  2. Rebuild image
  3. Push image(to docker hub)
  4. docker-compose down
  5. docker-compose up

After running docker-compose down, all apps go down. Then docker-compose up brings the whole stack back up.

Is there a way to redeploy individual images in Docker Compose without any downtime, and without bringing down the entire application stack?

1 Answers
Related