Skip to content
This repository
Browse code

Add dotcloud config and wsgi file for easy dotcloud deploy

  • Loading branch information...
commit 9674f7e7130c95b340ab806e8c35f5da9d4d5b89 1 parent 1a52b29
Mjumbe Poe authored July 18, 2012

Showing 2 changed files with 40 additions and 0 deletions. Show diff stats Hide diff stats

  1. 8  dotcloud.yml
  2. 32  wsgi.py
8  dotcloud.yml
... ...
@@ -0,0 +1,8 @@
  1
+www:
  2
+  type: python
  3
+  systempackages:
  4
+    - gdal-bin
  5
+    - libgdal1-dev
  6
+  prebuild: dotcloud/prebuild.sh
  7
+db:
  8
+  type: postgis
32  wsgi.py
... ...
@@ -0,0 +1,32 @@
  1
+"""
  2
+WSGI config for project project.
  3
+
  4
+This module contains the WSGI application used by Django's development server
  5
+and any production WSGI deployments. It should expose a module-level variable
  6
+named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
  7
+this application via the ``WSGI_APPLICATION`` setting.
  8
+
  9
+Usually you will have the standard Django WSGI application here, but it also
  10
+might make sense to replace the whole Django WSGI application with a custom one
  11
+that later delegates to the Django one. For example, you could introduce WSGI
  12
+middleware here, or combine a Django application with an application of another
  13
+framework.
  14
+
  15
+"""
  16
+import os
  17
+import sys
  18
+
  19
+CURR_DIR = os.path.dirname(__file__)
  20
+sys.path.append(os.path.join(CURR_DIR, 'src'))
  21
+
  22
+os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings")
  23
+
  24
+# This application object is used by any WSGI server configured to use this
  25
+# file. This includes Django's development server, if the WSGI_APPLICATION
  26
+# setting points here.
  27
+from django.core.wsgi import get_wsgi_application
  28
+application = get_wsgi_application()
  29
+
  30
+# Apply WSGI middleware here.
  31
+# from helloworld.wsgi import HelloWorldApplication
  32
+# application = HelloWorldApplication(application)

0 notes on commit 9674f7e

Please sign in to comment.
Something went wrong with that request. Please try again.