Giter Club home page Giter Club logo

django_wsgi_deployer's Introduction

A Django Apache mod_wsgi Deployment Script

You might find it useful for deploying multiple django projects to apache and mod_wsgi. This will also allow you to run your projects out of independent virtualenvs.

Requirements

apache2 python-setuptools libapache2-mod-wsgi python-pip python-virtualenv pyyaml

Output of deployer.py

This script will create a directory with the following files:

  • apache/environment.wsgi: a wsgi config file with necessary extensions to sys.path to get your django app running off in a virtualenv
  • apache/site.conf: an apache config file with hard-coded links to the project's environment.wsgi file (and virtualenv)
  • logs: an empty directory for apache logs
  • backups: an empty directory for backups
  • project_env: your virtualenv
  • %(project): a 'git clone' of your project

Configurations

Edit the configurations in "configs.yaml" and run "python deployer.py". (note: deployer.py requires "pyyaml")

After running, you will need to configure the database and create a symlink from the apache configurations to the "site.conf" file. For this, I'd recommend something like this:

  • ln -s /path/to/proj/my_cool_proj/apache/site.conf /etc/apache/sites-available/my_cool_proj.conf
  • ln -s /etc/apache/sites-available/my_cool_proj.conf /etc/apache/sites-enabled/my_cool_proj.conf

Install Python Requirements in Virtualenv

When it comes time to install project requirements, you must first activate your virtualenv:

source /path/to/proj/my_cool_proj/project_env/bin/activate

then install requirements

#example pip install -r requirements.pip

django_wsgi_deployer's People

Contributors

dorey avatar ukanga avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.