Guerrilla
Guerrilla

Reputation: 14926

Updating server with docker compose

When I have a change I want on my server I do this:

docker-compose pull
docker-compose down
docker-compose up -d

This is pretty quick but does involve site going down briefly. Is there a way to do it with a smaller amount of downtime or is this the best way?

Upvotes: 1

Views: 49

Answers (1)

rajesh-nitc
rajesh-nitc

Reputation: 5549

docker-compose down is not required. After the pull, you can directly do docker-compose up. It will only restart the containers for which there is a new version of the image after the docker pull. It will not impact the containers whose image stays the same. This setup works fine for me.

Upvotes: 1

Related Questions