01 2022 档案

摘要:[root@localhost ~]# tree ansible ansible ├── ansible.cfg ├── ce.yml ├── cisco.yml └── inventory ansible.cfg文件 [root@localhost ansible]# cat ansible.cf 阅读全文
posted @ 2022-01-19 22:36 mk-备忘 阅读(634) 评论(0) 推荐(0) 编辑
摘要:##问题:docker 容器打包后 更新应用代码不正确 ###一、 docker 容器打包过程解析(全程使用ansible) git 拉代码 拷贝git拉下来的代码,到中间文件夹(编译这个文件的代码) 编译中间文件夹的代码 容器打包,把代码封装到容器内,并提交 二、出现的问题 使用ansible打包 阅读全文
posted @ 2022-01-18 11:00 mk-备忘 阅读(296) 评论(0) 推荐(0) 编辑
摘要:1. Python的默认优化 执行a.py chmod +x a.py ./a.py 在默认情况下,其实Python就为我们做了优化:只要源文件不改变,生成默认的pyc文件后以后会执行编译好的pyc文件中的内容,这样大大提高了程序执行的效率! 2. 手动生成 .pyc 文件 参考资料:(https: 阅读全文
posted @ 2022-01-16 22:46 mk-备忘 阅读(115) 评论(0) 推荐(0) 编辑
摘要:对象版 文件结构 notify 里定义的是各种通知的方法 main 程序执行的入口 settings 配置文件 email.py class Email(object): def __init__(self): pass def send(self,content): print('email消息: 阅读全文
posted @ 2022-01-15 14:46 mk-备忘 阅读(31) 评论(0) 推荐(0) 编辑
摘要:class Myclass(object): # def __new__(self): # pass # 在实例化是会触发,它比 __init__早( __new__ 造出裸替的人,__init__ 穿衣服) def __init__(self): # print("__init__方法执行") s 阅读全文
posted @ 2022-01-14 00:08 mk-备忘 阅读(30) 评论(0) 推荐(0) 编辑
摘要:docker-compose 编排支持引入主机变量 docker-compose 编排 ports可写可不写,都不影响,容器的端口暴露,只是让人更好的理解而已 Dockerfile 新建容器的 EXPOSE 是否写,也不影响端口暴露,只是用docker inspect的时候有提示而已 使用docke 阅读全文
posted @ 2022-01-07 23:39 mk-备忘 阅读(375) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示