Skip to main content

Deploying your app

Now that you created your first wyStack app, it is time to deploy it to Azure!

You need an Azure subscription ☁️ to complete the steps below.

Creating app services on Azure

Sign in to the Azure portal: https://portal.azure.com/

Create 2 new app services, one for the NgLayer (UI) and one for the ServiceLayer (API). In this example we will use the following web app names:

  • myapp-ui
  • myapp-api

As a runtime stack, select .NET 5 for both app services.

Creating a new app deployment

👉 Choose App > App deployments in the main menu.

Create a new app deployment, as a deployment type select Test, Acceptance or Production. After that, name your app deployment. For this example we will use TEST.

App template URI's

Under the tab APP TEMPLATES, configure the URI's that you are going to use for your app's deployment. They have to match the app services created earlier in the Azure portal. In our example:

Kudu deployment settings

Under the tab AZURE, configure the deployment configuration settings for your app services. For our example:

NgLayer:

KUDU Site name: myapp-ui
KUDU User name: $myapp-ui
KUDU Password: ******

Service layer:

KUDU Site name: myapp-api
KUDU User name: $myapp-api
KUDU Password: ******

Passwords

You can get the deployment's password by downloading the publish profile of the app service in the Azure portal. Use the button on the Overview page: Get publish profile. It contains all settings required to deploy the app service, including the password.

Connection strings

Under the tab CONNECTION STRINGS, configure your Azure blob storage account and the database connection strings.

Updating your source code

After finishing all configuration changes to your model: re-generate your app and update the source code.

Now your app will contain deployment scripts to deploy your solution to Azure.

⚠️ Be careful, never upload your source code deployment scripts to any public (GIT) repository since they contain your app service credentials.

Building NgLayer

In order to deploy NgLayer to Azure, you first have to build it.

Open a new PowerShell terminal in: C:\apps\myapp\NgLayer
Execute: .\build.cmd

Deploying your app to Azure

Open the Azure portal and stop your app services.

Deploying NgLayer

Open a new PowerShell terminal in: C:\apps\myapp\NgLayer
Execute: .\deploy.ps1 TEST (where TEST is the name of your deployment)

Wait for the deployment to finish.

Deploying ServiceLayer

Open a new PowerShell terminal in: C:\apps\myapp\ServiceLayer
Execute: .\deploy.ps1 TEST (where TEST is the name of your deployment)

Wait for the deployment to finish.

Start your app services

Now start your app services using the Azure portal.

You are done, you deployed your first wyStack app to Azure! ⛅