我们使用2个框架来开发后端:
我们可以在同一个Azure AppService实例上部署这两个版本吗? 有什么建议吗?
答案 0 :(得分:0)
是的。与其他SO线程Installing wordpress on Azurewebsites running Django和How to Deploy Multiple Apps on Azure WebApps相似。
您可以在路径wwwroot
中部署一个应用程序,并将另一个作为虚拟应用程序部署在D:\home
的另一个子路径中,该子路径已在选项卡{{1 }}在Azure门户上的网站上。
以下是参考步骤。
Application settings
中创建一个类似other
的目录。site\wwwroot
和wwwroot
中。ohter
文件,其内容如下。用于启动SpringBoot jar的示例配置web.config
,来自Deploying Springboot to Azure App Service
web.config
Node.js应用程序的示例配置<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" />
</handlers>
<httpPlatform processPath="%JAVA_HOME%\bin\java.exe"
arguments="-Djava.net.preferIPv4Stack=true -Dserver.port=%HTTP_PLATFORM_PORT% -jar "%HOME%\site\wwwroot\ROOT.jar"">
</httpPlatform>
</system.webServer>
</configuration>
,请参阅Wiki页面Using a custom web.config for Node apps。
请注意使用不同的绝对路径进行配置,以避免名称冲突。