How to redeploy a single micro service using docker compose - fli-iam/shanoir-ng GitHub Wiki

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 -f docker-compose-dev.yml --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. We need to precise the docker-compose-dev file so that it is not based on github package but on local deployment

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