Skip to content
Browse files

Merge branch 'deploy-cleanup'

  • Loading branch information...
2 parents 4565d71 + 91375a6 commit c90f20ef9e5ed3a890cb2524634075477b7d35fc @brosner brosner committed Sep 12, 2011
View
30 docs/deployment.txt
@@ -22,8 +22,8 @@ Here is a basic configuration for Apache (assuming you are using Python 2.7)::
WSGIDaemonProcess mysite python-path=/path/to/mysite-env/lib/python2.7/site-packages
WSGIProcessGroup mysite
- WSGIScriptAlias / /path/to/project/deploy/wsgi.py
- <Directory /path/to/project/deploy>
+ WSGIScriptAlias / /path/to/project/wsgi.py
+ <Directory /path/to/project>
Order deny,allow
Allow from all
</Directory>
@@ -42,12 +42,12 @@ Install gunicorn_ in your environment (best to add it to your requirements
file) and run ``gunicorn``::
(mysite-env)$ pip install gunicorn
- (mysite-env)$ gunicorn --workers=2 --bind=127.0.0.1:8000 deploy.wsgi:application
+ (mysite-env)$ gunicorn --workers=2 --bind=127.0.0.1:8000 wsgi:application
-This assumes your current working directory is your project root (
-``deploy.wsgi`` must be importable from where you are). Running the example
-shown above as-is will not be sufficient for a production website. You will
-need to daemonize the gunicorn processes and supervise them. Please refer to
+This assumes your current working directory is your project root (``wsgi``
+must be importable from where you are). Running the example shown above as-is
+will not be sufficient for a production website. You will need to daemonize
+the gunicorn processes and supervise them. Please refer to
`gunicorn documentation`_ for more information.
.. _gunicorn: http://gunicorn.org/
@@ -56,7 +56,21 @@ need to daemonize the gunicorn processes and supervise them. Please refer to
Using FastCGI
=============
-TODO
+To use FastCGI (including SCGI or AJP) you must install `flup`_. This can be
+done by using ``pip``::
+
+ pip install flup
+
+Once installed, you can use Django's built-in ``runfcgi`` management command
+to run a server. For example::
+
+ python manage.py method=threaded host=127.0.0.1 port=3033
+
+You can learn much more about ``runfcgi`` from the Django documentation on
+`FastCGI deployment`_.
+
+.. _flup: http://trac.saddi.com/flup
+.. _FastCGI deployment: https://docs.djangoproject.com/en/1.3/howto/deployment/fastcgi/
Media files
===========
View
6 pinax/env.py
@@ -10,12 +10,6 @@ def setup_environ(dunder_file=None, project_path=None, relative_project_path=Non
if dunder_file is not None:
file_path = os.path.abspath(os.path.dirname(dunder_file))
- deploy_files = [
- "fcgi.py", "fcgi.pyc",
- "wsgi.py", "wsgi.pyc",
- ]
- if os.path.basename(dunder_file) in deploy_files and relative_project_path is None:
- relative_project_path = [os.pardir]
if relative_project_path is not None:
project_path = os.path.abspath(os.path.join(file_path, *relative_project_path))
else:
View
0 pinax/projects/account_project/deploy/__init__.py
No changes.
View
11 pinax/projects/account_project/deploy/fcgi.py
@@ -1,11 +0,0 @@
-from django.core.servers.fastcgi import runfastcgi
-
-import pinax.env
-
-
-# setup the environment for Django and Pinax
-pinax.env.setup_environ(__file__)
-
-
-# pass off handling to FastCGI
-runfastcgi(method="threaded", daemonize="false")
View
0 pinax/projects/zero_project/deploy/wsgi.py → pinax/projects/account_project/wsgi.py
File renamed without changes.
View
0 pinax/projects/basic_project/deploy/__init__.py
No changes.
View
11 pinax/projects/basic_project/deploy/fcgi.py
@@ -1,11 +0,0 @@
-from django.core.servers.fastcgi import runfastcgi
-
-import pinax.env
-
-
-# setup the environment for Django and Pinax
-pinax.env.setup_environ(__file__)
-
-
-# pass off handling to FastCGI
-runfastcgi(method="threaded", daemonize="false")
View
0 pinax/projects/static_project/deploy/wsgi.py → pinax/projects/basic_project/wsgi.py
File renamed without changes.
View
0 pinax/projects/blog_project/deploy/__init__.py
No changes.
View
11 pinax/projects/blog_project/deploy/fcgi.py
@@ -1,11 +0,0 @@
-from django.core.servers.fastcgi import runfastcgi
-
-import pinax.env
-
-
-# setup the environment for Django and Pinax
-pinax.env.setup_environ(__file__)
-
-
-# pass off handling to FastCGI
-runfastcgi(method="threaded", daemonize="false")
View
0 pinax/projects/blog_project/deploy/wsgi.py → pinax/projects/blog_project/wsgi.py
File renamed without changes.
View
0 pinax/projects/static_project/deploy/__init__.py
No changes.
View
11 pinax/projects/static_project/deploy/fcgi.py
@@ -1,11 +0,0 @@
-from django.core.servers.fastcgi import runfastcgi
-
-import pinax.env
-
-
-# setup the environment for Django and Pinax
-pinax.env.setup_environ(__file__)
-
-
-# pass off handling to FastCGI
-runfastcgi(method="threaded", daemonize="false")
View
0 pinax/projects/basic_project/deploy/wsgi.py → pinax/projects/static_project/wsgi.py
File renamed without changes.
View
0 pinax/projects/zero_project/deploy/__init__.py
No changes.
View
11 pinax/projects/zero_project/deploy/fcgi.py
@@ -1,11 +0,0 @@
-from django.core.servers.fastcgi import runfastcgi
-
-import pinax.env
-
-
-# setup the environment for Django and Pinax
-pinax.env.setup_environ(__file__)
-
-
-# pass off handling to FastCGI
-runfastcgi(method="threaded", daemonize="false")
View
0 ...x/projects/account_project/deploy/wsgi.py → pinax/projects/zero_project/wsgi.py
File renamed without changes.

0 comments on commit c90f20e

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