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-heroku
Let me explain what all I did, so that any one who is stuck like me can get the picture. I am using Linux Backtrack command line . 1. I started virtualenv and then installed flask virtualenv --distribute pip install flask
Then, connected heroku and github, created a repo also in the github. Wrote a simple script and saved it in app.py
Then, asked to create a procfile! web: python app.py
Questions. 1. What is procfile in layman terms? 2. When i type web: python app.py, it says 'web:: command not found'
Please elaborate how this works?
I have one more doubt, sudo is supreme user right? We are not supposed to use it in virtualenv? And for what exactly are we using virtualenv? A simple example.
Questions are pretty basic. DO bare.
Heroku apps include a Procfile that specifies the commands that are executed by the app on startup. You can use a Procfile to declare a variety of process types, including: Your app's web server. Multiple types of worker processes. A singleton process, such as a clock.
A Procfile is a mechanism for declaring what commands are run by your application's containers on the Deis platform. It follows the process model. You can use a Procfile to declare various process types, such as multiple types of workers, a singleton process like a clock, or a consumer of the Twitter streaming API.
A Procfile is a mechanism for declaring what commands are run by your application's dynos (or a web process) on the Heroku platform. You can use a Procfile to declare various process types, such as. a web dyno to run your web application.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With