WebFaction
Community site: login faq

Having gone through the docs for Bottle it explicitly says not to use bottle.run with Apache mod_wsgi. I've got a Bottle application that uses Gevent for concurrent connections but it says to pass 'gevent' as an argument to bottle.run to use the Gevent server.

How do I deploy this on to my WebFaction server? I presume I should be using a Custom App rather than Python/mod_wsgi?

asked 11 Jan '16, 21:05

zilog8bit
(suspended)
accept rate: 0%


Yes, a 'custom app listening on port' application is the way to go here. Basically:

  1. Create the 'custom app listening on port' application via the control panel and make a note of the assigned port number.
  2. Assign that app to your site in the control panel.
  3. When you run your app, bind it to your assigned port, eg if you have port 23456: run(host='127.0.0.1', port=23456, server='gevent')

Hope that helps!

permanent link

answered 12 Jan '16, 01:48

seanf
12.2k41836
accept rate: 37%

'3. When you run your app....'

Sorry, does this mean: python myapp.py ? Because if I do this I can no longer use the terminal because the Bottle application is running. If I use Apache and mod_wsgi the application runs in the background bound to the Apache service and the command line is still usable.

Is there anyway to keep the commandline available whilst running the Bottle app under the Gevent server?

(28 Jan '16, 00:51) zilog8bit

Sorry, does this mean: python myapp.py ?

Yes.

Is there anyway to keep the commandline available whilst running the Bottle app under the Gevent server?

Yes, you can run it in the background via nohup to detach it from the terminal, like this:

nohup python myapp.py >$HOME/logs/user/myapp.log 2>&1 &
(28 Jan '16, 01:03) seanf

Works great, thank you Sean

(28 Jan '16, 02:01) zilog8bit

You're very welcome!

(28 Jan '16, 02:02) seanf
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:

×225
×32
×9
×4

question asked: 11 Jan '16, 21:05

question was seen: 7,026 times

last updated: 28 Jan '16, 02:02

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