Docker 化的 Python 应用程序与生产中的可执行文件
我们在 Azure 生产环境上部署了一个基于 python 的应用程序作为 docker 映像。 我们使用Azure DevOps Pipeline Release来部署它。 应用程序的普通使用是通过批处理,如果需要则按需使用。 该应用程序使用本地数据库和环境变量,它输入数据、计算一些值并通过将文件存储在 blob 中或更新数据库来提供结果。
现在,我们被要求在本地移动应用程序(但仍使用 Azure DevOps 进行部署)。 然而,我们在使用 docker 时遇到了挑战。 Docker 使我们能够使应用程序可移植、隔离、易于部署并以某种方式可扩展。但对于客户端来说,基于 python 的应用程序不需要进行 Docker 化,只需将其打包为 .exe(使用 cx_freeze 等工具)即可在本地服务器上运行。
我从未在生产中遇到过这种用途,想知道是否有人经历过。这两种方法在开发、部署、可维护性方面有何优缺点?
谢谢。
We have a python-based application deployed as a docker image on Azure production environment.
We use Azure DevOps Pipeline Release to deploy it.
Ordinary usage of the application is through batch and if needed on-demand.
The application uses on-prem databases and environment variables, it inputs data, calculates some values and provides results either through depositing files in blobs or updating the database.
Now, we've been asked to move the app on premise (but still using Azure DevOps to deploy).
However, we've been challenged on the use of docker.
Docker allows us to make the application portable, isolated, easy to deploy and somehow scalable. But for the client, the python-based app doesn't need to be dockerised and should only be packaged to be a .exe (using a tool like cx_freeze) to be run on the on-prem server.
I've never encountered such use on production and would like to know if anyone experienced it. What would be the pro and cons of the two approaches, in terms of development, deployment, maintainability?
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论