问题
I'm brand new to Azure and have been trying to deploy a simple web app to my new Azure Cloud Service - however I only own a Mac. All of the tutorials I've seen from Microsoft say you can go to 'publish' from Visual Studio and select 'Cloud Service', but I only see Azure Websites as an option, presumably because I'm on a Mac. It seems the .NET Azure SDK is only available for Windows, and oddly when I try to install other Azure SDKS (tried node, python) the installer just says 'Could not install software because no software to install was found'.
Does anyone know if what I'm trying to do is even possible, and if so how to do it?
Thanks!
回答1:
We also do all our development on Mac, but we use Azure DevOps for CI.
I had a quick look and it seems that you can deploy an App Service from the Azure CLI also. There are a few methods for pushing the source, from a Git repo, from zip file etc. See az webapp deployment source config-zip
for deploying via zip.
https://docs.microsoft.com/en-us/cli/azure/webapp/deployment?view=azure-cli-latest
You could then make a simple deploy.sh file to handle all the steps of zipping up and deploying your app to azure.
回答2:
I use a Mac with Azure. What I do is the following.
- Create a publish folder of the app
- Deploy it manually through a FTP client such as FileZilla.
You can probably find a ton of tutorials on how to use FileZilla on the internet.
Note: if you are building and deploying continuously, I would recommend you use continuous integration and continuous deployment (CICD) which is available in Azure.
But for beginners, FileZilla is easy and simple.
来源:https://stackoverflow.com/questions/54122165/how-to-deploy-a-web-app-to-azure-cloud-service-from-a-mac