Flask app dont start on heroku server

后端 未结 2 1209
温柔的废话
温柔的废话 2021-02-05 19:06

I\'m trying to deploy a Flask app with Heroku. It\'s simple API. Works great local with foreman but I get error (log is below) when starts on heroku.

This is my app code

相关标签:
2条回答
  • 2021-02-05 19:44

    1.Procfile should be without any extension.

    2.Content of Procfile should be: web: gunicorn app:app --preload

    Note:usually --preload is used when the size is more.

    0 讨论(0)
  • 2021-02-05 19:53

    Is there actually a running dyno called web? It looks like you might have forgotten to scale your web dyno:

    Add an entry like this in your Procfile:

    heroku ps:scale web=1
    

    You can use

    heroku ps
    

    to confirm that your web dyno is running.

    0 讨论(0)
提交回复
热议问题