Tuesday, June 6, 2017

Django in Production and Virtualenv

Hello all,
              There is a topic of confusion for me related to Apache and mod_wsgi.
I have been using two cloud providers DigitalOcean and PythonAnywhere.  The latter actually let me get
a home page being served by apache and not the development server ( which actually isn't even an option
on PythonAnywhere).  I could setup Django with one click and set it up with python3.4.  
          So, my questions are as follows: 1)  Virtualenv is described as so important but it seems it only can work in
development.  I mean once the terminal session closes, the venv that I setup is no longer active?
2) How do I get an IDE like Pycharm to recognize the Virtualenv?  I know I can select the compiler to be inside the 
Virtualenv but other libraries that I installed into that virtualenv, if the virtualenv is not active, then it won't find the 
installations of the different libraries.
3) I am thinking of using Docker to solve these problems but for some reason, I'd like to see how this was done without Docker.

4) I believe that nginx can work better as a reverse proxy whether using Docker or not, e.g. if I want to install WordPress 
on the same server or the same vps as Django/Flask, with nginx listening on port 80 the default.  I'm studying nginx now,
so, if apache can work as a reverse proxy, load balancer and web server, is it easier or better to use nginx for this?

Thanks so much for any help in advance,
Bruce   

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/0e9b0985-ae29-49cd-8005-1be393db79f1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment