Skip to main content

Deploy to Microsoft Azure

This tutorial will show you how to deploy your services to your own Azure subscription using Defang.

Prerequisites

Step 1 - Navigate to your project directory

Head to the folder where your project is located.

$ cd path/to/your/project

Step 2 - Configure your Azure credentials

After signing in to your Azure account, select an existing subscription or create a new one. Make sure billing is enabled.

Run the following Azure CLI command to authenticate:

$ az login

Step 3 - Create a stack

Before you deploy, you should create a stack. In this case, we will create a stack called dev:

$ defang stack create dev

Defang will ask which region you want to deploy to and which Azure subscription to use.

Step 4 - Deploy

Invoke the following CLI command. Defang will ask you which stack you want to deploy to.

$ defang compose up

Step 5 - Inspect your deployment

Defang will provision resources in your Azure subscription and deploy your services. You can inspect the resources created in your Azure Portal.


For a deeper discussion of the Defang Azure architecture, see our Azure docs.