-
Notifications
You must be signed in to change notification settings - Fork 5.6k
01b. Deploying to Azure App Service from Visual Studio for Mac
To deploy the eShopOnWeb sample application to an Azure App Service (assuming you've already cloned or downloaded it locally, and you have an Azure account), follow these steps from Visual Studio for Mac:
Click New in this case.
4. Choose an App Name, Subscription, Resource Group, and App Service Plan, including region and pricing.
You can choose a free tier just to test things out. Click Next.
If you want, you can deploy the app into a container. To do so, the container will be published to Azure's container registry. Specify the registry details and then click Create. If you don't want to deploy as a container, uncheck the box and then click Create.
Creating the app service may take a few minutes. You're free to continue working in the meantime.
Once the publish process has completed, your deployed app will launch in your browser.
You may see an error page like this one:
If so, you need to either use the Development environment in your Azure App Service (which should only be done when testing), or configure an actual SQL Server database for the application to use.
To make this change, log in to the Azure Portal, navigate to your App Service, and go to its Configuration blade. Add a new configuration setting called ASPNETCORE_ENVIRONMENT and give it a value of Development.
Don't forget to hit Save, and then refresh your application. It should now load successfully:
Learn more about Azure deployment options in the official documentation.
- Getting Started for Beginners (with video)
-
Walkthroughs
- Deploying to Azure App Service from Visual Studio
- Deploying to Azure App Service from Azure Portal
- Deploying to Azure App Service from Visual Studio for Mac
- Running as a Linux Container locally in Visual Studio
- Deploying as a Linux Container into Azure App Service
- Running in a Windows Container locally in Visual Studio
- Running as a Linux Container locally in Visual Studio for Mac
- Deploying as a Windows Container into a Windows Container host in Azure
- Working with the Project and Adding New Features using Visual Studio for Mac