Hello,
I’m new to render and I tried to deploy a simple todo app to test it. The source code is here.
I create a new web service using the UI and I got this from the log (this is just the end)
Oct 2 08:45:13 PM • Installing asyncpg (0.26.0)
Oct 2 08:45:13 PM • Installing fastapi (0.85.0)
Oct 2 08:45:13 PM • Installing httpie (3.2.1)
Oct 2 08:45:13 PM • Installing hypercorn (0.14.3)
Oct 2 08:45:13 PM • Installing tortoise-orm (0.19.2)
Oct 2 08:45:14 PM
Oct 2 08:45:14 PM Installing the current project: render_demo (0.1.0)
Oct 2 08:45:14 PM ==> Generating container image from build. This may take a few minutes...
Oct 2 08:46:58 PM ==> Uploading build...
Oct 2 08:47:46 PM ==> Starting service with 'hypercorn render_demo.main:app'
Oct 2 08:47:56 PM [2022-10-02 18:47:56 +0000] [54] [INFO] Running on http://127.0.0.1:8000 (CTRL + C to quit)
My start command is hypercorn render_demo.main:app and it works on my local machine.
I have any idea what goes wrong here, if somebody can help me, it will be great.
Also, I tried to run the web service in Oregon and Ohio regions without success.
Hi there,
You can’t use port 443 or 80. You don’t need to specify a port as we should locate the port it runs on when it first boots - can you try without specifying a port?
Hi @John_B thanks for the contribution but I don’t understand what you mean. Even if I don’t specify a port, hypercorn by default will run on port 8000.
Honestly, I didn’t imagine it would be so complicated to deploy a python application, I’m disappointed.
There should be examples of async frameworks in the documentation
Hi there,
If it runs on port 8000 then we should find that as part of the deployment process and wire it up correctly, if all else fails run it on 10000 and set an environment variable PORT=10000 to prevent any detection taking place,