Urdro
Urdro

Reputation: 957

How to deploy Django project without fabric

This might be a dumb question, maybe not. I'm currently done with the development of a Django project and would like to deploy it. Since Python 3 is not supported by Fabric. I need to install and configure things by myself I guess.

So the question I have is what software should I use in the virtualenv of my project?

NGINX
gunicorn
memcached
supervisord
git

Or should all of these software be installed outside of the virtualenv?

Upvotes: 1

Views: 126

Answers (3)

Nursultan Bolatbayev
Nursultan Bolatbayev

Reputation: 148

I have not tried memcached, but I can tell about the rest.

First, you install nginx and supervisord outside of virtualenv.

Second, in virtualenv using pip you install gunicorn.

Finally, you have got folder (e.g. /var/www/youproject/), and inside that folder you have virtualenv (/var/www/youproject/myenv), then project for django (/var/www/youproject/mysite/). Then inside your django folder you can clone the project from github. You can also do it with SFTP, but cloning through github is easiest I think. Of course, upload ur django project from you local development server to github.

If you want to have git in production server either, then be sure you don't include sensitive, private data (e.g. passwords), unless you have private repository at github. You install git globally (OS package manager), then initialize it inside your django project.

Upvotes: 2

Leonardo Andrade
Leonardo Andrade

Reputation: 616

I'm using Ansible to do my deploys. With Ansible I can provision all my server and do deploys easily. I recommend.

Upvotes: 1

kubilayeksioglu
kubilayeksioglu

Reputation: 498

  1. All of these are system-wide software and not merely python packages.

  2. Fabric doesn't work in your server, what it does is only to read the fabfile.py, connect to your server and take actions according to file. So you can install Fabric to your python2.7 site-packages, and still use fab live deploy in your project. Only it wouldn't work in your virtualenv, so you'll either open a new tab or just say deactivate

Upvotes: 0

Related Questions