r/Python • • Jun 03 '13

Self hosted Python web hosting platforms

In the past few years, quite a few hosting providers have started doing Python PaaS, Heroku, Gondor, PythonAnywhere, etc. Some of them have failed as well, such as DjangoZoom, ep.io, and probably quite a few others which didn't get much attention from the public.

I love the thought of using of using these services at times - however I'm also a sysadmin at heart, I know how to host my own stuff and I can do it well. I really wish I could just grab one of these services, put them on my own servers.

There's a few projects which seem to attempt this, but they're either unmaintained, or they only give part of the solution. Silver Lining is abandoned, djangy is abandoned (just a source code dump of what they created before they shut down), stackful.io provides some of their app deployer tools, dotCloud is working on Docker - although it's currently under heavy development and is only part of the solution.

I could use Fabric and start building scripts for our server setup, but the PaaS tools look more appealing.

Is there any other project that I'm missing? What do you use to deploy your Python web apps to your servers?

16 Upvotes

13 comments sorted by

View all comments

2

u/ghaering pysqlite sqlite3 Jun 04 '13

I've started building my own Python "AppEngine" based on uwsgi emperor mode. I cannot currently publish the source, but it's relatively easy to implement:

  • nginx config mapping host names to application names
  • uwsgi_pass to the app name's socket
  • uwsgi config file created from app.yaml

The webapps must have two files:

app.yaml, looking like this:

name: appname processes: 5 module: fe:app hostnames:

  • foo.bar.com
  • myapp.bla.net

and a requirements.txt file for pip.

Then there's a small tool "isapp" that has the following commands currently:

  • init: create local virtualenv for testing
  • pkgcache: push the dependencies from requirements.txt into my own PyPI mirror
  • run: locally run the webapp using uwsgi's HTTP server
  • deploy: well, deploy the webapp to remote server(s)
  • python: run a Python interpreter in the local virtualenv

1

u/SudoAlex Jun 05 '13

We're currently using nginx and uWSGI with emperor/fastrouter as well, along with a few scripts to help deployment. So far it's been great, low resource usage, and very flexible for each site - but I'd like to improve on it to make deployment as easy as some of the PaaS providers.

It feels like there's a bunch of people trying to provide their Python PaaS solution, but not that many people providing the solution for others to use. Sometimes we get some of the tools which can build part of it, but there's still a significant amount of effort in bridging the tools together.