项目作者: best-practice-src

项目描述 :
Python Deployer
高级语言: Python
项目地址: git://github.com/best-practice-src/py-deployer.git
创建时间: 2021-02-10T17:00:11Z
项目社区:https://github.com/best-practice-src/py-deployer

开源协议:GNU General Public License v3.0

下载


Py Deployer

Py Deployer is a lightweight package to execute zero-downtime deployment on Linux servers.

  1. pydeploy -s prod

✨ Features

  • Cross-technology deployments
  • Simple configuration
  • Zero downtime deployments
  • Multiple environment management
  • Release version management
  • Use SSH protocol

⚠ This package does not currently support after-deployment scripts

1️⃣ Installation

  1. sudo pip3 install py-deployer

2️⃣ Configuration

Create the file deploy/config.yaml inside your project as following:

  1. # Example of file: ./deploy/config.yaml
  2. deploy:
  3. # Shared files and folders (between releases)
  4. shared: [.env]
  5. # All available servers (SSH configuration)
  6. servers:
  7. dev:
  8. hostname: '10.56.12.0'
  9. port: 22
  10. user: 'dev_username'
  11. password: ~ # Ignore that if you use SSH keys
  12. deploy_path: '/server/application/path'
  13. stage: 'develop'
  14. branch: 'dev'
  15. identity_file: ~ # Ignore that if it stay in the default folder (~/.ssh)
  16. repository: ~ # Ignore that if you run pydeploy from a git project directory
  17. max_releases: 3
  18. # ...
  19. prod:
  20. hostname: '10.56.11.0'
  21. port: 22
  22. user: 'prod_username'
  23. password: ~ # Ignore that if you use SSH keys
  24. deploy_path: '/server/application/path'
  25. stage: 'production'
  26. branch: 'master'
  27. identity_file: ~ # Ignore that if it stay in the default folder (~/.ssh)
  28. repository: ~ # Ignore that if you run pydeploy from a git project directory
  29. max_releases: 3

3️⃣ Deployment

Deploy your application by running:

  1. pydeploy -s <dev|stag|prod|...>