Deploy Containerized Python Flask App to Heroku
App.py
In the main function, ensure you have the following code to get the port from the os environment
if __name__ == '__main__':
port = int(os.environ.get("PORT", 6000))
app.run(host="0.0.0.0", port=port, debug=True)
Dockerfile
# syntax=do...
fanthoni.hashnode.dev1 min read