Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # www.fduran.com
- # Heroku notes for python, fixes http://devcenter.heroku.com/articles/python
- # Ubuntu 11.04 (Natty Narwhal)
- mkdir heroku
- cd heroku
- # Prerequisites
- curl -O https://raw.github.com/pypa/virtualenv/master/virtualenv.py
- cp virtualenv.py /usr/bin/virtualenv
- chmod a+x /usr/bin/virtualenv
- # for Flask example: pip install Flask
- # Local Workstation Setup
- # apt-add-repository doesn't work
- echo "deb http://toolbelt.herokuapp.com/ubuntu ./" >> /etc/apt/sources.list
- curl http://toolbelt.herokuapp.com/apt/release.key | apt-key add -
- apt-get update
- apt-get install heroku-toolbelt
- # note: they say so but that does not install foreman
- ln -s /usr/bin/ruby1.8 /usr/bin/ruby
- heroku login
- nano web.py
- # Declare Dependencies with Pip
- nano requirements.txt
- # note: after first deployment it change magically to wsgiref==0.1.2, back to Flask
- pip freeze > requirements.txt
- # rest the same
- # Foreman
- apt-get install rubygems
- gem install foreman
- ln -s /var/lib/gems/1.8/bin/foreman /usr/bin/foreman
- # rest the same
- # pushing changed code
- git add . # for new files
- git commit -am "balh"
- git push heroku master
- # django
- # pre-requisite before pip install Django psycopg2
- apt-get install libpq-dev python-dev
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement