feat: warn when incorrect interface/port in use for web processes
Users that misconfigure their process's listening interface or port will now see an additional healthcheck warning for web deploys. While only a single port is checked, this ensures that users at least have some context as to why their app isn't responding as expected. Closes #4798
This commit is contained in:
@@ -31,7 +31,10 @@ if __name__ == "__main__":
|
||||
for arg in sys.argv:
|
||||
print(f"Arg: {arg}")
|
||||
|
||||
port = int(os.getenv("PORT", 5000))
|
||||
port = int(os.getenv("PORT", "5000"))
|
||||
if os.getenv("ALT_PORT"):
|
||||
port = int(os.getenv("ALT_PORT", "5000"))
|
||||
|
||||
server = http.server.HTTPServer(("0.0.0.0", port), GetHandler)
|
||||
print("Listening on port {0}".format(port))
|
||||
server.serve_forever()
|
||||
|
||||
Reference in New Issue
Block a user