vibhorgupta-gh / Argus

Update your Docker container to the latest base image effortlessly
GNU General Public License v3.0
30 stars 4 forks source link

Support for semantically versioned tags #33

Open vibhorgupta-gh opened 3 years ago

vibhorgupta-gh commented 3 years ago

Context:

https://www.reddit.com/r/selfhosted/comments/kuokk6/argus_a_typescript_based_successor_to_watchtower/ https://github.com/containrrr/watchtower/issues/749#issue-782788319

Kernald commented 3 years ago

What is the current logic? Pulling the same tag, and checking whether it changed or not?

vibhorgupta-gh commented 3 years ago

Hi @Kernald

I'd been inactive for quite a while, pardon

So the current logic is pretty simple and unscaleable: fetch the current image name and look for the latest tag of the same, if it doesn't exist, Argus doesn't update the image. Needless to say, this needs fixing but I haven't gotten around to it yet

This is next on my list, so all inputs appreciated!

vibhorgupta-gh commented 3 years ago

Resolved in 09d084c88418c2bb1d3fe149c54a719f47ce6896

Hi @Kernald, semver tags are now supported. Argus will update to all minor and patch releases respecting semver nomenclature. Do try it out!

lukasmrtvy commented 3 years ago

@VibhorCodecianGupta Thanks ! Is possible to bump also docker image? Seems that whaleit/argus is outdated. Thanks

EDIT: please, allow us to auto-update also major versions

dazinator commented 3 years ago

Great work! I was the person that originally raised the watchtower issue for semver support, kudos on tackling this and much more with Argus. One thing that occurs, it's often desirable to have different environments like Dev which is allowed to have "unstable" images deployed, and Prod, where Prod should only have "stable" images deployed. A semver tag is considered unstable if it has a prerelease label - e.g "1.0.0-alpha.1". It would be great if Argus could be configured on a Dev / CI environment for example to allow unstable releases and thus if "1.0.0-alpha.2" was released it would be deployed there, but on the Prod env, where Argus is configured not to allow unstable images, it would be ignored there. Only when there was a newer stable tag (no pre release label) would it be deployed to prod. Any thoughts on that?

vibhorgupta-gh commented 3 years ago

Hi @lukasmrtvy

  1. I've just bumped the docker image with the tag 1.0.0. I also took the liberty to go ahead and remove the previous tags because 1. they didn't respect semver, 2. they were images for a pre-release version of Argus with bare minimum functionality, and 3. v1.0.0 is a much more complete tool.
  2. I refrained from allowing automatic major updates as it would be good practice to check release notes first and make sure the auto-update won't break anything on the system. But I guess we can leave the control to the user and make it flag based. I'll work on it in the next minor release!

Hi @dazinator

Thanks, glad you find it useful! That's a great idea, this behaviour should be easy to put in with environment variables and flags. I'll see how best can this be put in and make a release shortly!

vibhorgupta-gh commented 3 years ago

Hi, @lukasmrtvy @dazinator

A new version is up on both npm and docker hub with the requested features, in case you haven't checked them out already :D Feel free to provide feedback or open bug reports/feature requests