Search code examples
pythonpyramidwsgidotcloud

Deploying Pyramid to dotcloud


What is the proper way to deploy a Pyramid project to dotcloud?

The contents of wsgi.py:

import os, sys
from paste.deploy import loadapp
current_dir = os.path.dirname(__file__)
application = loadapp('config:production.ini', relative_to=current_dir)

I'm currently getting the following error.

uWSGI Error
wsgi application not found

Solution

  • I was able to get pass the uWSGI Error error using :

    import os
    from paste.deploy import loadapp
    current_dir = os.getcwd()
    application = loadapp('config:production.ini', relative_to=current_dir)
    

    I still had a path problem with the static files so I changed:

    config.add_static_view('static', 'static', cache_max_age=3600)
    

    to

    config.add_static_view('<myapp>/static', 'static', cache_max_age=3600)