Revadike / epicgames-freebies-claimer

Claim available free game promotions from the Epic Games Store.
MIT License
2.23k stars 361 forks source link

Create data directory to improve k8s convenience #123

Closed wzxjohn closed 3 years ago

wzxjohn commented 3 years ago

Because k8s can only mount config map or secret as directory, it will override all files in the same directory of config file. So I move each config to it's own folder so anyone who want to run the docker image on k8s can simply mount the config folder without affect anything else.

wzxjohn commented 3 years ago

By the way, why setting loop to false in Docker file?

Revadike commented 3 years ago

By the way, why setting loop to false in Docker file?

The docker fork isn't mine.

jackblk commented 3 years ago

By the way, why setting loop to false in Docker file?

I did it because the image is intended to be run only once a week, suitable for many services offering on-demand trigger or simply a crontab.

For user who wants to trigger it once per week, to disable the loop we will need to implement a bit more to the code base. Maybe I will create a PR for a better way to disable/enable the loop via env var. If user wants to use via k8s, they can override the config file anyway so I think this is currently the best option.

wzxjohn commented 3 years ago

By the way, why setting loop to false in Docker file?

I did it because the image is intended to be run only once a week, suitable for many services offering on-demand trigger or simply a crontab.

For user who wants to trigger it once per week, to disable the loop we will need to implement a bit more to the code base. Maybe I will create a PR for a better way to disable/enable the loop via env var. If user wants to use via k8s, they can override the config file anyway so I think this is currently the best option.

I see. Sorry I didn't understand the design here at first. So I can actually run this container directly in k8s using CronJob instead of Deployment. Thanks!

Revadike commented 3 years ago

Thanks for the PR! Accepted!

Now, todo:

wzxjohn commented 3 years ago

Thanks for the PR! Accepted!

Now, todo:

  • [ ] Update wiki to reflect this change in the next update

I have finished the wiki update. Could you please double check it now?

Revadike commented 3 years ago

https://github.com/Revadike/epicgames-freebies-claimer/wiki/Installation-(Prerequisites) is missing the device_auth.json should be moved to /data

wzxjohn commented 3 years ago

https://github.com/Revadike/epicgames-freebies-claimer/wiki/Installation-(Prerequisites) is missing the device_auth.json should be moved to /data

Added 😄

jackblk commented 3 years ago

I will update wiki for Docker version in next version. For now we are still at 1.5.3, new file structure will be updated in 1.5.4.

Revadike commented 3 years ago

Yes