Azure Web App
A YetaWF site can be hosted as a Azure Web App. The deployment method outlined here can be used for any Azure hosting tier. In all cases, the DBs have to be uploaded separately using one of the tools provided by Azure/Microsoft.
Using Visual Studio's Publish feature is NOT recommended, because YetaWF makes extensive use of symbolic links from the website to source packages, which cannot be deployed by Visual Studio.
Follow these steps to deploy your site to Azure. It is assumed that you have the site running locally on your development system and are using the same domain name locally (using your ).
- Update the file ".\Utilities\CopySite\CopySite FROM DEV.txt" to reflect your site details
- If your site is using SQL DBs, make sure to update the connection strings in your site's AppSettings.Prod.json file - This file is renamed to AppSettings.json by the CopySite utility when your site is uploaded - Your development system's AppSettings.json file is NOT used on the server
- Make any other changes in AppSettings.Prod.json for your site as needed
- Rebuild your site in Visual Studio (Build All, Release)
- Execute ".\Utilities\CopySite\CopySite FROM DEV.bat" to create a site image to be FTP'd to Azure.
Updating "CopySite FROM DEV.txt"
The CopySite utility will copy all your website files to a temporary location, from where you have to upload the files to Azure using FTP (we recommend using FileZilla). In order to do so, you have to customize the "CopySite FROM DEV.txt" file, which contains information specific to your local development system. The "CopySite FROM DEV.txt" file is located at ".\Utilities\CopySite", relative to your YetaWF solution folder.
Once you have configured this file you won't have to modify it again unless your web server changes.
# Relative location of the website we want to deploy
# Location where the site image is created (to be FTP'd to Azure)
# The config file portion that is used for app.config, AppSettings.json, hosting.json, web.config.
The SiteLocation statement defines where your site files are located on your development system, relative to the "CopySite FROM DEV.txt" file. You normally don't need to change this.
The TargetFolder statement defines where the website files are created (on your development system). This location will contain all files for your website, which are then uploaded to Azure using FTP.
Defines the file name for all configuration files (app.config, AppSettings.json, hosting.json, web.config). When specified, the specified ConfigParm string is added to the config file name before the extension. The ConfigParm string can contain periods. For example, then ConfigParm Prod is specified, the files app.Prod.config, AppSettings.Prod.json, hosting.Prod.json and Web.Prod.config are copied for deployment and are named app.config, AppSettings.json, hosting.json, web.config on the deployed site. If one of the files app.Prod.config, AppSettings.Prod.json, hosting.Prod.json or Web.Prod.config does not exist on the development system, the matching file (without the ConfigParm string) is copied instead.
Run CopySite - Development System
Assuming your "CopySite FROM DEV.txt" file has been updated and you have rebuilt your site (Release build), you're ready to create your site image by running CopySite.
.\Utilities\CopySite\CopySite FROM DEV.bat
This will create the site image which has to be uploaded to your Azure site.
If you accidentally try to deploy a Debug build, CopySite will warn you.
Once you have uploaded the files to Azure and uploaded the SQL DBs that your site uses, your Azure site is ready to start up.