How can I deploy Django projects with minimal installation work?

To deploy a site with Python / Django / MySQL, I had to do this on a server (RedHat Linux):

  • Install MySQLPython
  • Install ModPython
  • Django installation (using python setup.py installation)
  • Add some directives to the httpd.conf file (or use .htaccess)

But, when I deployed another site with PHP (using CodeIgniter), I had nothing to do. I ran into some problems when deploying a Django project on a shared server. Now my questions are:

  • Is it possible to simplify the process of deploying a Django project?
  • Am I doing too much?
  • Can I skip some of the steps?
  • What is the best way to deploy a django site on a shared server?
+3
7

django?

. script , . MySQL, MySQLPuthon, mod_wsgi ( mod_python) Django .

, .

?

. Python ( Django) Apache. PHP Apache. PHP , mod_python ( mod_wsgi). . (-, PHP , mod_wsgi mod_python.)

?

. .

django ?

.

php ( CodeIgniter),

, . -, PHP . .

, PHP Python. PHP - Apache. Python - "" , Apache (.. Mod_python mod_wsgi).

. Python "" HTML PHP?

+3

Django, :

Fisrt-

  • virtualenv. mod_wsgi
  • Django django ( python setup.py)
  • python

,

Alias /media/ /usr/local/django/mysite/media/

<Directory /usr/local/django/mysite/media>
  Order deny,allow
  Allow from all
</Directory>

WSGIScriptAlias / /usr/local/django/mysite/apache/django.wsgi

<Directory /usr/local/django/mysite/apache>
  Order deny,allow
  Allow from all
</Directory>

>

+4

Django , PHP, . WebFaction - , Django, Python, mod_python, mod_wsgi, MySQL, PostgreSQL .. . , SSH, , .

: .

+2

PHP, - . -, Django, .

+1

, . , , .

+1

LAMP (Linux, Apache, MySQL, PHP), - . PHP, CakePHP, -, (, ), .

Django ( Rails ) , , .

. - , Fabric Capistrano, .

P.S. WebFaction. , . , .

0

Python virtualenv pip (. " Python Hacker: Virtualenv, Fabric Pip "). Django . . mod_wsgi. mod_wsig:

import site  
site.addsitedir('C:\PythonVirtualEnv\IntegralEnv\Lib\site-packages') 
0

Source: https://habr.com/ru/post/1715739/


All Articles