是否可以将App Service的发布方法从代码转换为Docker? [英] Is it possible to convert the publish method of an App Service from Code to Docker?

查看:66
本文介绍了是否可以将App Service的发布方法从代码转换为Docker?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经建立了一个Azure应用服务(Linux)发布方法,即Code,并建立了适当的管道来构建和部署我的代码(nodejs).现在,我需要对运行我的代码的主机(需要poppler)进行更多控制.在开发+测试中,我创建了新的App Services,并选择了Docker Container作为发布方法

I have set up an Azure App Service (Linux) publish method being Code and have set up the appropriate pipeline to build and deploy my code (nodejs). Now I need more control on the host running my code (need poppler). On dev + test I have created new App Services and have chosen Docker Container as publish method

我的问题:对于我的PROD实例,是否可以更改现有应用程序服务的发布方法,还是必须创建一个新的应用程序服务?

假设使用后者,则需要更新客户端以指向新的App Service URL.为避免这种情况,我可以先删除现有的App Service并创建一个具有相同名称的新服务吗?这会让我丢失所有统计信息和日志.

Assuming the latter, I would need to update the client to point to the new App Service URL. To avoid that, could I first delete the existing App Service and create a new one with the same name ? This would make me lose all stats and logs.

还有其他建议吗?

推荐答案

应用服务计划可以运行代码或容器

the App Service Plan can run either code or container

以应用服务计划为目标的Web应用可以来自自定义泊坞窗或已知的源代码库.(例如,nodejs)

The Web App that target the App Service Plan can come from a custom docker OR a known source code base. (e.g. nodejs)

https://docs.microsoft.com/zh-CN/cli/azure/webapp?view = azure-cli-latest#az-webapp-create

在选择代码时,您正在设置运行时并允许Web应用程序获取代码,那么运行时将使用一个众所周知的基本容器并引入您的代码.

when selecting code, you are setting the runtimes and allowing the web app to fetch the code, what happens is the the runtime will used a well known base container and bring in your code.

最后,即使最初的部署使用的是Code Base,在相同的App Service Plan上部署基于容器的Web应用程序也不会出现问题.

In the end, you shouldn't have a problem deploying a container based web app on the same App Service Plan even though the original deployment was using Code Base.

您应该更多地依赖Azure CLI,因为门户有时无法为您提供全部功能.

you should rely on the Azure CLI more since the portal sometimes doesn't provide you with the full power.

还可以查看应用服务交换"方法,将流量从代码库转移到容器库.

Also hav a look at the App Service Swapping method, to move your traffic from your code base to your container base.

https://docs.microsoft.com/en-us/azure/app-service/deploy-staging-slots

您可以利用广告位来帮助您进行交换!

you can leverage slots to help you out with the swapping!

这篇关于是否可以将App Service的发布方法从代码转换为Docker?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆