0

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
tshepang
  • 12,111
  • 21
  • 91
  • 136
user975323
  • 23
  • 2

3 Answers3

2

This could indicate that wsgi.py could not be imported successfully.

You can check the following:

  • output of dotcloud logs appname.servicename
  • log into the service with dotcloud ssh appname.servicename, then go to the current directory, start python and see what happens if you try to do from wsgi import application

If that can help, here is a super-simple Pyramid app: https://github.com/jpetazzo/pyramid-on-dotcloud

jpetazzo
  • 14,874
  • 3
  • 43
  • 45
0

try this:

import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'hellodjango.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

http://docs.dotcloud.com/tutorials/python/django/

Jim Syyap
  • 1,625
  • 7
  • 20
  • 23
0

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)
bbigras
  • 1,311
  • 2
  • 17
  • 32