Skip to content

How to redeploy a single micro service using docker compose

atouboul edited this page Sep 12, 2018 · 1 revision

This is how a container should be redeployed when using docker-compose :

When you make changes to your app code, remember to rebuild your image and recreate your app’s containers. To redeploy a service called web, use:

$ docker-compose build web

$ docker-compose up --no-deps -d web

This first rebuilds the image for web and then stop, destroy, and recreate just the web service. The --no-deps flag prevents Compose from also recreating any services which web depends on.

Source : https://docs.docker.com/compose/production/

Clone this wiki locally