WebFaction
Community site: login faq

It is planned to support the Bootle WSGI application soon?

I know that have alternatives approaches to deploy a Bottle application as a CherryPy application, but a native support to Bottle it's very interesting.

Justifications:

https://github.com/defnull/bottle/graphs

http://techblog.netflix.com/2013/03/python-at-netflix.html

asked 28 Mar '13, 07:01

brunoavp
111
accept rate: 0%


We've not had much demand for a Bottle installer, so we have no plans to add an installer for it at this time.

That said, we fully support everything you would need to run it, and it's quite simple to set up manually. For example:

  1. Create a "mod_wsgi 3.4/Python 2.7" app in our control panel and attach it to a website.
  2. SSH to your server and run the following commands to install bottle:
    cd ~/webapps/name_of_app
    mkdir -p lib/python2.7
    export PYTHONPATH=$PWD/lib/python2.7
    easy_install-2.7 -s $PWD/bin -d $PWD/lib/python2.7 bottle
  3. Create your bottle WSGI app. Here's a simple example, which you can save as app.wsgi:
    import bottle
    
    @bottle.route('/')
    def index():
        return 'Hello world!'
    
    application = bottle.default_app()
  4. Point Apache at your WSGI app by adding the following to your apache2/conf/httpd.conf:
    WSGIScriptAlias / /home/you/webapps/name_of_app/app.wsgi
  5. Restart your Apache.
At that point, your Bottle app (app.wsgi) will be served by the site your created in step 1.

Hope that helps!

permanent link

answered 28 Mar '13, 17:39

seanf
12.2k41836
accept rate: 37%

edited 28 Mar '13, 17:57

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×337
×62
×9
×3

question asked: 28 Mar '13, 07:01

question was seen: 4,173 times

last updated: 28 Mar '13, 17:57

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM