cpoppema / docker-flexget

An auto updating FlexGet container.
82 stars 39 forks source link

Add option for unattended upgrades #58

Open Noki opened 4 years ago

Noki commented 4 years ago

I would love to see an option (ENV variable) that allows the container to automatically upgrade itself to the latest version. With a cronjob and "flexget -V" it should be possible to detect that a newer version is available and then the container could just restart itself, which is currently the upgrade method.

cpoppema commented 4 years ago

Hello @Noki I guess it would indeed be fairly simple to compare the versions output by flexget -V. Killing the flexget container (gracefully if at all possible) from the inside would rely on either docker run --restart unless-stopped or its equivalent in a docker-compose.yml. I don't think it will work with "regular" docker create and start commands (without an external process manager like systemd/supervisor). How are you starting your container ?

Noki commented 4 years ago

Currently I do it using the UI of my Synology NAS. It's basically docker run --restart unless-stopped. In addition I use Ouroboros (https://github.com/pyouroboros/ouroboros) to automatically update some containers that change and that are usually safe to update automatically.

Automatically updating the the docker-flexget container / repo for every new flexget version would probably be the best choice because it would than work with Ouroboros or Watchtower. I think you could automate it with GitHub Actions, however I have never done this myself.

opicron commented 3 years ago

I am using watchtower on the synology and every docker is nicely updated all the time. By far the best solution.