I am trying to run my Flask application in dokploy, but it never seems to work.
The code, which is an api builds perfectly fine and the logs show that gunicorn succesfully runs. I have tried this specific code locally on a windows machine as well as a linux machine, my code works perfectly without any errors on those, I am also able to manually reverse proxy the api on a linux server, but for whatever reason whenever I go to put a domain in, the api does not seem to work. I made sure that the container port is 8000 which is where my application is running. The domain is pointing correctly to my VPS and I have made sure that this was not the problem by trying a react application, that worked fine.

4 Replies
I guess you need to change the IP to 0.0.0.0 instead of 127.0.0.1
You need to put 0.0.0.0
if name == 'main':
app.run(debug=False, ip="0.0.0.0", port=5000)
I have done that but still it runs on 127.0.0..1
i tired on local it worked fine
For working in public you need 0.0.0.0 ip
It’s working on django , flask , fastapi
It will be automatically works with all range of ip