Skip to content

Instantly share code, notes, and snippets.

@snosrap
Forked from defnull/gist:1224387
Created February 10, 2012 18:51
Show Gist options
  • Save snosrap/1791618 to your computer and use it in GitHub Desktop.
Save snosrap/1791618 to your computer and use it in GitHub Desktop.
Deploy a Bottle app on Heroku
mkdir heroku
cd heroku/
virtualenv --no-site-packages env
source env/bin/activate
pip install bottle
pip freeze > requirements.txt
cat >app.py <<EOF
import bottle, os
@bottle.route('/')
def index():
return "Hello World"
bottle.run(host='0.0.0.0', port=os.environ.get('PORT', 5000))
EOF
chmod a+x app.py
echo 'web: python app.py' > Procfile
cat >.gitignore <<EOF
env
*.pyc
EOF
git init
git add .
git commit -m "Initial commit"
heroku create --stack cedar
git push heroku master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment