#20406: manage.py generate nginx/apache/uWSGI/gunicorn sample config
-------------------------------+--------------------
     Reporter:  est            |      Owner:  nobody
         Type:  Uncategorized  |     Status:  new
    Component:  Uncategorized  |    Version:  1.4
     Severity:  Normal         |   Keywords:
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  0              |      UI/UX:  0
-------------------------------+--------------------
 Hello,

 This is just an idea, if this issue is inappropriet please ignore.

 I see a lot of people having troulbe setting up django for production
 because the hassle of setup and config process.

 For lower the barriers to entry of Django, I suggest we implement
 scaffolding some sample config based on current dir and settings.

 For example:

 $ python manage.py getconfig uwsgi+nginx

 The utility will ask the user to input the domain for the project:
 example.com

 The command output two files, uwsgi.ini and example.com.nginx.conf

 uwsgi.ini:

 [uwsgi]
 chdir = LAST_COMMAND_CWD
 module = wsgi:application
 workers = 2 # number of cores
 master = true
 socket = LAST_COMMAND_CWD/django.sock


 example.com.nginx.conf should be automatically placed under nginx sites-
 available, and prompt the user to ln -s to the sites-enabled dir.

 server {
   server_name example.com
   location /static/ {
      # generated using settings.py MEDIA_PATH and STATIC_PATH.
   }
   location / {
      include uwsgi_params;
      uwsgi_pass  LAST_COMMAND_CWD/django.sock;
   }
 }

 In the above example LAST_COMMAND_CWD is the abspath where user executed
 manage.py command.

 This is just a rough example. The goal is to give an official standard
 reference deploy structure and process.

 Later we can even add some parameters that allows SA to automatically
 genreate the correct config for seamless infrastructure migration.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/20406>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to