websoft9/cli/Notes.md
chendelin1982 34e0cce673 docker
2021-10-17 22:47:15 +08:00

22 lines
799 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## CLI 开发备注
整个CLI采用MVC思想
* stackhub.py 代表视图层 V用户体验层专注体验编排不进行条件编程
* model.py 代表数据层 M。这是系统的最底层都是与业务无关的系统级功能
* controller.py 代表控制层 C。调用 M 层,针对业务编程
#### 用户如何获取项目清单?
用户同步 stackhub 上已经存放的清单,而不是通过 API 获取。原因:
1. 避免API使用需要授权或超时
2. 避免未发布的应用被安装
#### 如何获取所有已占用的端口号?
基于 psutil 模块打印所有端口信息,然后匹配关键词
#### 是否可以直接使用 Linux 命令?
为了提高操作系统的兼容性,尽量减少 Linux 命令使用,可以多使用 Python 包处理 Docker