Metadata-Version: 2.1
Name: django-deploy-kit
Version: 0.10.2
Summary: A deploy tool for Django
Home-page: https://github.com/FreeYeti/django-deploy
Author: Free Yeti
Author-email: free.yeti.team@gmail.com
License: MIT
Description: # Django Deploy
        
        For deploy Django project on Linux server.
        
        Features:
        
        1. Automatic
        
        2. Zero downtime
        
        3. Multiple version
        
        4. Easy rollback
        
        
        ## Requirements on server
        
        * Nginx
        * Anaconda
        * Nodejs
        * PM2
        
        ## Quick start
        
        1. Add "deploy" to your INSTALLED_APPS setting like this:
        
            ```python
            INSTALLED_APPS = [
                ...
                'deploy',
            ]
            ```
        
        2. Configure ssh:
        
            add host config in `~/.ssh/config`
            
            ```bash
            Host host1
                Hostname xxx.xxx.xxx.xxx
                Port 2222
                User xxxx
                ServerAliveInterval 60
                # IdentityFile ~/.ssh/id_rsa_xxxxx
            ```
            
            create ssh-key file
            
            ```bash
            ssh-keygen -t rsa -C "xxxx@xxxx.com"
            ```
            
            you could leave a blank for password, when you execute ssh command it will not ask your password again
        
        3. Add definition in settings of Django app
        
            ```python
            GIT_URL = 'git@github.com:path/name.git'
            GIT_DEPLOY_BRANCH = 'stable'
            APP_NAME = 'appname'
        
            DEPLOY = {
                "host1": {  # same as ssh-config
                    "task_prefix": "app-process",  # prefix of process name
                    "home_path": '/path/to/appname/www',  # path of each versions
                    "static_path": '/path/to/appname/statics',  # path of statics for each versions
                    "conda_path": '/path/to/anaconda3/bin',  # path of anaconda bin 
                    "nginx_conf": "/etc/nginx/sites-enabled/appname",  # enabled site config of Nginx
                    "fixed_deploy_path": '/path/to/appname/fixed', # use to do migrate
                }
            }
            ```
        
        4. create PM2 and Nginx configure template
        
            create directory name of `deploy` in your base path of Django app 
            
            ```bash
            deploy/
            └── templates
                └── deploy
                    ├── ecosystem.config.template
                    └── nginx.conf.template
            ```
            
            content of `ecosystem.config.template`
            
            ```bash
            ...
            ```
            
            content of `nginx.conf.template`
        
Platform: UNKNOWN
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Framework :: Django :: 2.1
Classifier: Framework :: Django :: 2.2
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Description-Content-Type: text/markdown
