Deploy to Azure App Service

This article explains one way to deploy Weavy to an Azure App Service. For more details and other options you can also read the Microsoft Docs article Deploy ASP.NET Core apps to Azure App Service.

Start by signing into your account on the Azure Portal.

Create web app

Click Create a resource and choose Web App. Select the appropriate subscription and resource group. Enter app Name and select the following values for Publish, Runtime stack and Operating System.

  • Publish: Code
  • Runtime stack: .NET 6 (LTS)
  • Operating System: Windows

Configure the App Service Plan and finish by clicking Review + create.

Create storage account

Click Create a resource and choose Storage Account. For Performance we recommend you select Premium and for Premium account type you should select Block blobs. Fill out the other required values and click Review + create to finish setting up the storage account.

Now you need the Connection string. Navigate to the newly created storage account. Click Access keys and then Show keys. Note the value of Connection string under key1.

Create SQL database

Click Create a resource and choose SQL Database. Fill out all required values to create an empty database. Make sure other Azure services can access the database by setting the appropriate firewall rules. Wait for the deployment to finish.

Navigate to your deployed database and click Connection strings. Locate the ADO.NET connection string and save it for later.

You also need to know the username and password of the database server admin. For username, see Server admin on the Overview blade on the database server. If you don't know the password, you can reset it by clicking Reset password, also on the Overview blade.

Configure settings

Navigate to the Web App you deployed earlier and click Configuration. Add appropriate configuration settings under Application settings. The most important things to configure is your license key and the storage account connection string as described below:

Weavy:License = YOUR-LICENSE-KEY
Weavy:Plugins:0:Type = Weavy.Core.Plugins.AzureBlobProvider,Weavy.Core

On the same page, scroll down to Connection strings and click New connection string. Enter Weavy as the Name and paste the ADO.NET connection string from the earlier step into the Value field (replacing {your_username} and {your_password} with your SQL Server admin username and password). Finally select SQLAzure in the Type field and click Ok.

Then switch to the General settings tab and make sure Web sockets is On.

Publish and deploy Weavy

Prepare a copy of the Weavy backend code for deployment as explained here. This compiles the app code and copies dependencies, configuration files, static assets, etc. into the bin/Release/{TARGET FRAMEWORK}/publish folder.

Next, open the Azure portal and navigate to the Overview blade of your Web App. Click Get publish profile. Open the downloaded file and locate the publish profile for FTP. Use publishUrl, userName and userPWD to connect using your favorite FTP client.

  <publishProfile profileName="weavy - FTP" publishMethod="FTP" publishUrl="..." userName="..." userPWD="..."></publishProfile>

Finally, transfer the contents of the bin/Release/{TARGET FRAMEWORK}/publish folder to site\wwwroot on your Web App.

Browse the website

That should be it. Open a browser and navigate to the URL of your Wep App. If everything worked out you should see the Weavy logo on your screen.

Weavy Docs