What I did for pylons app deployment.

I try to install my application created on Pylons on the Debian server that has already Apache2 + mod_wsgi + virtualenv + userdir.

What I did:

  1. creating prod.ini by copying development.ini.
  2. Change sqlalchemy.url
  3. set debug = false
  4. write a script in ~/public_html/wsgi-script as follow:
    import os
    import site
    os.environ['PYTHON_EGG_CACHE'] = "/home/myhome/egg"
    from paste.deploy import loadapp
    APP_CONFIG = "/home/myhome/wsgiapp/basa2/prod.ini"
    application = loadapp("config:" + APP_CONFIG)
  5. I also modify this file: /home/vee/pydev/PYLONS-1/lib/python2.5/site-packages/Pylons-0.9.7rc3-py2.5.egg/pylons/wsgiapp.py by checking before the command:
    del  environ['pylons.pylons']

    following this changeset. (I use Pylons 0.9.7rc3)

The procedures above are just conclusion. I did a lot of trial and error. I also restart Apache web server (I must not have to do). By the ways, it works now.



Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  เปลี่ยนแปลง )

Google+ photo

You are commenting using your Google+ account. Log Out /  เปลี่ยนแปลง )

Twitter picture

You are commenting using your Twitter account. Log Out /  เปลี่ยนแปลง )

Facebook photo

You are commenting using your Facebook account. Log Out /  เปลี่ยนแปลง )


Connecting to %s