-
-
Save WillSams/3933697 to your computer and use it in GitHub Desktop.
Deploy a Bottle app on Heroku
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir heroku | |
cd heroku/ | |
virtualenv --no-site-packages env | |
source env/bin/activate | |
pip install bottle gevent | |
pip freeze > requirements.txt | |
cat >app.py <<EOF | |
import bottle | |
import os | |
@bottle.route('/') | |
def index(): | |
return "Hello World" | |
bottle.run(server='gevent', port=os.environ.get('PORT', 5000)) | |
EOF | |
chmod a+x app.py | |
echo 'web: app.py' > Procfile | |
echo 'env/' > .gitignore | |
git init | |
git add . | |
git commit -m "Initial commit" | |
heroku create | |
git push heroku master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment