Open Revadike opened 2 years ago
Currently if user uses Docker image, it already has auto update via latest
tag. Docker user will want to disable this option as default, but non-docker user will want it to be enabled as default.
If we use config file to disable/enable this option, it will cause a problem. Normally people will run the docker image without providing config.json
file, so it will copy from the example config (enabled as default for non-docker user). Can be done, but not nice to use.
So in order to avoid conflict with docker users, I suggest that we have check for an environment variable like EFC_DISABLE_AUTO_UPDATE
. If this env var is true
, then we will disable auto update. This is very easy to config in Dockerfile
, we will disable auto update module in Docker image as default.
If Docker user wants to have autoupdate, they can also override the env var. Win-win for docker or non-docker user.
Maybe this latest
tag can override the config value, if we can detect it somehow for docker.
Hmm then maybe we can have both? EFC will check for the:
config.json
EFC_DISABLE_AUTO_UPDATE
Something like: if (!process.env.EFC_DISABLE_AUTO_UPDATE && config.autoUpdateFlag)
This way, even if we use default config, we can still disable it on docker image via env var EFC_DISABLE_AUTO_UPDATE
.
Is it not safe to assume people with the latest
tag want auto-update enabled?
If user uses latest
tag on docker, it will automatically update to new version when I publish the new version (docker behavior). So they don't need to check or use the auto update module. If user wants to use a specific version (v1.5.6 for example), then they want to pin the version and do not want to update.
My suggestion for EFC_DISABLE_AUTO_UPDATE
env var is for the docker user convenience (they can use default config file and disable via env var, which is easy to do in docker). It will not affect normal user.
I hope this makes sense 🤔
How about we just disable any auto-update features if the user uses docker, since they have their own system anyway?
Yeah that's what I'm suggesting. And the easiest way to do it is via checking env var EFC_DISABLE_AUTO_UPDATE
.
https://github.com/sindresorhus/is-docker/blob/main/index.js maybe
It just checks for docker env & group, just like what we are trying to do by checking env var EFC_DISABLE_AUTO_UPDATE
.
if (!process.env.EFC_DISABLE_AUTO_UPDATE && config.autoUpdateFlag)
is enough for us, only docker user will have that specific env var to disable autoupdate module.
My 5 cents: I'm using docker in DSM (Synology's OS) and it doesn't auto-update containers built with the latest
tag, I'd need to download new image and reset the container manually. Some other containers I run do auto-update the software they run inside and I find it extremely useful!
Current Behavior (if any)
Only notifies of new version.
Desired Behavior
Add a setting, such that
epicgames-freebies-claimer
will auto-update.Motivation / Use Case for Changing the Behavior
If a breaking bug occurs, fixes can be automatically retrieved and operation can continue normally.