epicgames-freegames-node
epicgames-freegames-node copied to clipboard
Add option to keep webserver always active for health check monitoring
I am running this docker and it successfully gets games for me. I have never been presented with a captcha (yet anyway). Is there supposed to be any output through http while no captcha is requested to be solved? I get connection refused on port 3000 while portforwarding port 3000 to port 3000 on the inside of the docker.
Is there supposed to be a landing page or something?
No you shouldn't expect anything for 2 reasons:
- When idling (between scheduled free game checks), the container completely exits the Node process to save on memory (About 100MB saved). No web server is running here.
- The way puppeteer-extra-plugin-portal (which this project uses) works is that it only spins up a webserver when the a portal is opened. In this case, it's when an hCaptcha challenge is presented. If the captcha is bypassed, a webserver will never be opened.
I understand this makes testing the setup difficult, which is why I think #159 is a good idea.
There's also potential to spin up a "health check" webserver while idling. It would make the container consume a bunch more memory for no good reason, though.
If you decide to include a health check, maybe it can only be running when a test environment variable is set. And that would be the same time it would test notifications, or they had separate environment variables to test that at startup.