基于Docker & Fabric的Web项目部署方案
本文描述了Web项目的两种部署方案,石器时代的ssh & pull & restart方式不做太多说明 1.基于Fabric(Python)的部署方案 Fabric 是一个用于ssh的Python库&命令行工具 Fabric is a Python (2.5-2.7) library and command-line tool for streamlining the use of SSH for application deployment or systems administration tasks. 1.1结构 Interface flask django ... Script fabric conf (服务器配置列表) lib(基础库&二次开发) 1.2示例 1.2.1.配置文件conf_server.sample.py #!/usr/bin/env python # coding=utf-8 SERVER_DICT = { "www": [ "root@0.0.0.0", "password", "/home/mt/v1" ], "v1": ...