I want to deploy a Flask app on Heroku but I don't know how to tell Heroku terminal to execute "flask run" command
Asked
Active
Viewed 68 times
0
-
what does your Procfile look like? – Learning is a mess Mar 07 '22 at 15:29
-
web: gunicorn run:app – Abhi Dalvi Mar 07 '22 at 16:15
-
Then if your Flask app is named app and instantiated inside a file named run.py you should be fine. – Learning is a mess Mar 07 '22 at 16:38
-
Well that's not the case. I made some changes in ProcFile : "web: python app.py" This is the Log 2022-03-07T16:33:33.303463+00:00 app[web.1]: Dash is running on http://127.0.0.1:30489/ 2022-03-07T16:33:33.303712+00:00 app[web.1]: * Serving Flask app 'app' (lazy loading) 2022-03-07T16:33:33.303771+00:00 app[web.1]: WARNING: This is a development server 2022-03-07T16:33:33.303793+00:00 app[web.1]: Use a production WSGI server instead. 2022-03-07T16:34:21.188052+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch – Abhi Dalvi Mar 07 '22 at 16:47
-
As others have said, you probably need to bind the right port, see https://stackoverflow.com/a/22056973/3275464 – Learning is a mess Mar 07 '22 at 17:13