I uploaded folder Called Chat contains index.php for chat application to azure from the cloud power shell. now if I change the directory to Chat and run the command (az webapp up --runtime "PHP|7.3") I get the following error:
Could not auto-detect the runtime stack of your app.
HINT: Are you in the right folder?
For more information, see 'https://go.microsoft.com/fwlink/?linkid=2109470'
how can I deploy this php app from the cloud shell??
As mentioned in the link referenced in the error message, the current support for az webapp up includes apps targeting:
Python
Node
ASP .NET and - .NET Core
As part of the execution of az webapp up command it performs a best effort detection to match your code (in your local directory) with a supported runtime in your Web App. If you want to set the runtime manually you can use the az webapp create command.
For a detailed walkthrough on how to deploy a PHP app to Azure App Service, please follow this quickstart depending on your desired hosting platform (Windows/Linux).
Related
At first I want to mention, I did try some articles and also tried to get help for existing question/answer regarding deploying the war file to Azure web app but I didn't really got any where. I am new to it but also existing support either was in complete or very old.
I have created an App Service in Azure to host the war file. For my app service, I have selected Java 17 on Linux. For server stack selected 'Java SE'. (I also created another web app with that uses TomCat instead of Java SE server stack)
Then I wanted to publish the war file. So here I need guidance steps/ instruction to publish the war file Azure web app.
You can deploy your WAR package to Azure App Service to run your Java web app using the Azure CLI, PowerShell, or the Kudu Publish API.
Note: It is not recommended of deploying WAR/JAR/EAR packages using FTP or WebDeploy.
Use az webapp deploy command to deploy a WAR Package:
az webapp deploy --resource-group <group-name> --name <app-name> --src-path ./<package-name>.war
Refer to Microsoft documentation - Deploy WAR/JAR/EAR packages to Azure App Service for detailed information.
I am currently using PythonAnywhere to deploy my web2py project, it is working fine for me.
Now I want to deploy my web2py application on azure App service. I followed all the steps mentioned in below Goggle group
Creating web apps with Web2py in Azure Web Apps
Still I can see default page of azure python web app. I also tried to do it with same code base mentioned in given git repository.
I am unable to figure out which document I should refer or what are the right steps to deploy web2py project to Azure web app service.
Below are the steps I followed to deploy web2py project to Azure app service
Created Azure app service with P1V2 app service plan. Linux machine with python 3.6 default language
Selected local git repository in deployment center and pushed code to azure git repository. It shows deployment successful message
Browse azure website, but this time it is not showing expected landing page. It is showing me default app page of azure website
I tried steps 3-4 times but everytime I am getting same result. Am I missing something here?
I reviewed the forum thread Creating web apps with Web2py in Azure Web Apps of Google Groups as you mentioned, I see there is a file named web.config in its attachments, as the figure below.
However, the discussion is too old at 2015-11-13. At that time, Azure only supports Windows for Azure App Services, but you were trying to reproduce it on Azure WebApp for Linux based on Docker, because P1V2 Sku is for Linux and Standard S1 for Windows, as the figures below.
P1V2 Sku of Azure App Service Plan for Windows
Standard S1 Sku of Azure App Service Plan for Windows
So if you want to reproduce the same application of the thread of Google Groups on Azure WebApp for Windows, please try to refer to my answer for the other SO thread No pip or python module inside azure webapp. There is not any Azure offical document introduce how to deploy a Python application on Azure Windows WebApp.
Otherwise, please refer to the two Azure offical documents Quickstart: Create a Python app in Azure App Service on Linux and Configure a Linux Python app for Azure App Service to try to change and deploy it on Azure Webapp for Linux. Even that you need to follow the document Configure a custom Linux container for Azure App Service to create a custom docker image for deployment.
I want do deploy code to Linux App service plan over FTP but I fail because I am missing a step how to "say to app service to use app DLL instead of default one".
Code is copied, I even uploaded test zip file and I can't download it, getting error 404 so how did Microsoft imagine to deploy code over FTP? I couldn't find any info in their documentation regarding this exact case.
I want to avoid using docker file, If this can't be done I'll simply switch to using Windows based App service plan.
In application setting screen of your WebApp mention the startup file name
dotnet
I am trying to deploy the basic-bot Microsoft Botbuilder sample application to azure.
I started by creating a new botbuilder node.js sample application through the Azure dashboard, and I was able to successfully follow the instructions here to download and redeploy the application.
I then attempted to copy over the deploy scripts and .env file from the downloaded sample application into the basic-bot application, and attempted to publish using the az bot publish command from the link above. This successfully deployed the basic-bot application, but the deployed application now returns 500 errors. Initially, the 500 errors were caused by the "botbuilder-ai" nodejs package not being installed. I installed this package manually through the Azure console, and this error went away. But the application continues throw 500 errors, without producing a stack trace, and I have not been able to determine why.
The only official documentation I have found that explains how to deploy the bot is specifically for C# and Visual Studio. Is there a way to deploy a bot to azure for a Node.js app using the azure CLI?
Thank you.
Is there a way to deploy a bot to azure for a Node.js app using the
azure CLI?
Yes there is. You can type az bot publish -h for all the options available to you when publishing a bot. Here are some tips about getting it to work:
You will need to log in to Azure with az login
Make sure you've set an active subscription. Type az account set -h for help. Use az account list to see your choices of subscriptions and az account show to see the current active subscription
Publishing can be easier if you set the resource group you're publishing to as your default. Unlike your active subscription, configured defaults don't reset when you log out. Use az configure to see your current defaults and az configure -h to see how to set a default resource group
If you publish and it says Not a valid azure publish directory. missing post deploy scripts then you'll need a PostDeployScripts folder in your bot folder
There are some instructions in the deploymentScripts folder that you might find helpful. Note that as an alternative to the Azure CLI, you can also publish from Visual Studio Code using the Azure App Service extension.
If you publish successfully and you're getting errors when you try to test in Web Chat, sometimes Azure needs a little nudging. When I checked my Channels blade it said Web Chat was encountering errors regarding missing files. I tried some troubleshooting steps and eventually got it to work without any real changes.
Try logging out of your Azure account in the online portal and then logging back in
Try running your code in the online code editor in the Build blade
Try publishing again
Regarding your specific situation of trying to repurpose the downloaded source code to deploy the basic-bot sample, there are a few things you need to know. The .bot file is very important as it contains information about all the services the bot uses, but basic-bot.bot contains none of the needed information. In addition to the deployment scripts and the .env file you will also need to copy over your .bot file. However, basic-bot's bot.js expects the .bot file to contain a LUIS service named "basic-bot-LUIS" so you need to go into the bot.js code and change the value of LUIS_CONFIGURATION to the name of the LUIS service in your .bot file ("BasicBotLuisApplication" if you downloaded the V4 Basic Bot NodeJS code and kept it the same). Make sure you can get the basic-bot sample to run locally before you try to publish it.
I am currently building an ARM Template that deploys the following.
App Service Plan
App Service
MS Deploy .NET Core Application on the App Service
The problem is that after the .NET Core Application is deployed I want to execute a command in the console. I have tried a couple of different ways to do it via the CustomScriptExtension, but I keep getting :
"No route registered for '/CustomScriptExtension?api-version=2015-06-15'"
Which makes me think that the Custom Script Extensions are supported for VMs only and not for App Services (I am a bit new to ARM Templating and there is nothing useful I could find in the Azure Quickstart Templates).
Any suggestions on how I can execute a simple command in the App Service command promt via an ARM Template ?
I use the runcommand option of msdeploy to run a command after deployment.
In my case I added a manifest.xml to the root of the zip file that will be deployed:
<MSDeploy.iisApp>
<runcommand path="move D:\home\site\wwwroot\applicationHost.xdt D:\home\site\" dontUseCommandExe="true" MSDeploy.MSDeployKeyAttributeName="path" />
</MSDeploy.iisApp>
The "MSDeploy.MSDeployKeyAttributeName="path"" is important. More details here.
The content of the path attribute will be executed on the remote mashine.
I hope this helps,
KirK