You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
Jake Howard fa19bff73b
Update README.md
5 months ago
.github/workflows Init rust application 5 months ago
src Correctly terminate if parts of the process terminate 5 months ago
.gitignore Init rust application 5 months ago
Cargo.lock Add logger and verbose flag 5 months ago
Cargo.toml Add logger and verbose flag 5 months ago
LICENSE Initial commit 5 months ago
README.md Update README.md 5 months ago

README.md

compose-updater

CI

Simple command to enable updating docker-compose based applications.

If newer containers are available than those running, pull the new containers, and cycle the containers. Supports specifying multiple containers using globs, and multiple globs if necessary.

Features

  • Only cycle application if containers were updated (unless --force-cycle specified)
  • Don't try and update stopped containers (unless --force-pull specified)

"How does it work?"

  • List images
  • If there are images, pull (docker-compose pull)
  • List images again
  • If images list is different, cycle container (docker-compose down && docker-compose up -d)

"How's this different from pull and up -d?"

After writing this, turns out that docker-compose support doing most of this for you.

If there are existing containers for a service, and the service’s configuration or image was changed after the container’s creation, docker-compose up picks up the changes by stopping and recreating the containers (preserving mounted volumes).

Therefore, you can easily achieve this by simply pulling each compose file, and running up -d. Which changes all this Rust into a handful of lines of Bash.