Deploying python flask app with remote ddbb and failed without explanation

I am trying to deploy a public GitHub repo to a web service (it is a toy app). I’ve run it locally and confirmed that it works. It’s a Python flask app that uses an external ddbb (MySql)

I’ve tried deploying it a few times and it’s failed every time. I’m new to Render and truly appeciate any help.
Jorge Varela

Your server is starting up as it’s supposed to. There are two problems here:

  • we are not sure what port Render expects your service to listen on, so if you have port 5000 hardcoded somewhere I could imagine that Render is expecting a different one, and thus all your requests will fail, plus, Render’s health check mechanism will fail as well, reporting your deployment as failed.
  • It’s better to deploy your app as wsgi. The default template for Django of Render will help you do that.

I recommend giving a good read to that: How to deploy with WSGI | Django documentation | Django

Best of luck! :slight_smile:

Thank you Christos_Alexiou for your help.
I use the gunicorn and everything was ok.
Thanks again

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.