Django deployment module. Creates necessary folders for housing project source code clones, deploys, submodule checkouts
DJANGO_GIT_REPO_URL = "git://your/repo.git" #django project repo url
DJANGO_STAGING_GIT_BRANCH = "develop"
DJANGO_STAGING_SERVER_NAME = "staging.some_project.com"
DJANGO_PRODUCTION_GIT_BRANCH = "master"
DJANGO_PRODUCTION_SERVER_NAME = "production.some_project.com"
DJANGO_GUNICORN_PORT = '9010'
DJANGO_LOCALSETTINGS_LOCAL_PATH = "localsettings.py" #Path to localsettings on local machine
# A dictionary you can use if you want to treat localsettings as a template. # This dict get’s autopopulated with other useful keys: # * project_root # * www_root - holds the log_dir and code_root # * log_dir # * code_root - where your django code ends up # * project_media - django media folder (in your code_root by default) ((usually used by collectstatic)) # * project_static - django static files folder location, also in code_root by default # * virtualenv_root # * services - path where things like apache.conf and supervisor.conf end up.
DJANGO_LOCALSETTINGS_TEMPLATE_DICT = {} DJANGO_LOCALSETTINGS_REMOTE_DESTINATION = “some_folder/localsettings.py” #RELATIVE TO THE CODE_ROOT ON REMOTE MACHINE DJANGO_LOCALSETTINGS_NO_TEMPLATE = True #Set to false if you want to treat localsettings.py as a template
Creates initial folders, clones the git repo. DOES NOT DEPLOY()
run collectstatic on remote environment. ASSUMES YOU ALREADY HAVE ALL REQUIRED PACKAGES AND VIRTUALENV INSTALLED.
deploy code to remote host by checking out the latest via git