Deploy to Azure

Microsoft Azure provides many options to host and deploy a web application, this document talks about hosting Fanray on Azure App Service and deploy using Visual Studio.

Resources

Go to Azure Portal and create the following resources.

  • At a minmum you need an Azure App Service with a SQL Database.
  • Blob Storage is not required, but I recommend it running in Production. You have a choice of storing uploaded images on File System or Blob Storage, by default appsettings.Production.json use Blob Storage.
  • Fanray logs to Application Insights in addition to log files in Production. Application Insights is a cheap yet powerful analytical tool, so I recommend it.

Connection Strings

After creating the resources, the connection strings should have been created for you. Go to your created App Service > Configuration, make sure the following are there, if not create them.

  • Under Application Settings section, your Application Insights Instrumentation Key APPINSIGHTS_INSTRUMENTATIONKEY
  • Under Connection strings section, have defaultConnection point to your SQL Database, and BlobStorageConnectionString point to your Blob Storage.

Deployment

There are many ways to deploy the app to Azure, GitHub, CI/CD pipeline, or you can do it from inside your Visual Studio. Right click on Fan.WebApp project > Publish.

Docs
Posts