Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to keep webserver always active for health check monitoring #160

Open
sigboe opened this issue Oct 6, 2021 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@sigboe
Copy link

sigboe commented Oct 6, 2021

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?

@claabs
Copy link
Owner

claabs commented Oct 6, 2021

No you shouldn't expect anything for 2 reasons:

  1. 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.
  2. 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.

@sigboe
Copy link
Author

sigboe commented Oct 7, 2021

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.

@claabs claabs added the enhancement New feature or request label Oct 15, 2021
@claabs claabs changed the title Is the webserver supposed to show anything at all, if there is no captcha to solve? Add option to keep webserver always active for health check monitoring Oct 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants