Launching an app in heroku? What is procfile? 'web:' command?

后端 未结 1 1629
眼角桃花
眼角桃花 2021-02-12 19:07

I was referring to this site as i am learning python/flask and trying to use heroku.

http://ryaneshea.com/lightweight-python-apps-with-flask-twitter-bootstrap-and-herok

相关标签:
1条回答
  • 2021-02-12 19:23

    the Procfile tells Heroku what commands should be run (https://devcenter.heroku.com/articles/procfile).

    You are able to define difference process types, such as web (the only one which will autostart by default), workers, etc...

    So basically a Procfile containing

    web: python app.py
    

    is telling Heroku to started a named process called web, and to run python app.py when it starts.

    There is Python specific documentation for Heroku at https://devcenter.heroku.com/articles/getting-started-with-python#declare-process-types-with-procfile

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