Page cover image

📙Deploy a .NET Core Application on Clouddley Triggr

Learn how to deploy a .NET Core app on Triggr.

In this article, our focus will be on deploying a .NET core application on Clouddley Triggr. However, before going into that, it's important to understand Clouddley Triggr. Clouddley Triggr is a zero downtime application deployment tool that auto-detects your runtime and deploys your application to your server (virtual machines and bare metal). So, let's get started!

Prerequisites

Deploy a .NET Core Application

Accessing Clouddley Triggr Apps

  • Launch your web browser and log into your Clouddley account.

  • Navigate to Triggr Apps and click on Deploy App

Image of Triggr Apps dashboard.
Accessing Triggr Apps

Step 1: Configure Service

  • Choose your Git hosting service; either GitHub or Bitbucket. For this tutorial, we will be using GitHub.

  • Click on Continue with GitHub

Configuring Git hosting service during app deployment on Triggr Apps.
Choose your Git hosting service

Step 2: Configure Git

  • To connect your GitHub user or organization account, click the Select username/organization dropdown and Add GitHub account.

  • Select your repository and the branch from the dropdown list or quickly search.

  • Click on NEXT

Configuring the Git repository during app deployment on Triggr Apps.
Setup the .NET core application repository on Triggr

Step 3: Configure your Virtual Machine

  • To configure your VM, insert your VM hostname or IP address, VM user, and the VM port for SSH access.

  • Use the Clouddley CLI (recommended) or connect via SSH to verify.

The Clouddley CLI is a command-line tool that allows you to interact with the Clouddley Platform from your terminal.

  • Open the command line of the remote VM you want to configure to Clouddley and install Clouddley CLI by running the command:

curl -L https://raw.githubusercontent.com/clouddley/cli/main/install.sh | sh
  • To install Triggr, run the command:

clouddley triggr install

Using the CLI, you can deploy resources, manage configurations, and automate tasks efficiently.

  • Click on Verify. This verifies the connection

  • Click on NEXT

Configuring the virtual machine during app deployment on Triggr Apps.
Configuration of virtual machine on Triggr

Step 4: Configure app settings

Insert the name of the application and its port.

Configuring App settings (name and port) during app deployment on Triggr Apps.
Configure the App name and port

Ensure the virtual machine's firewall permits access to the application port.

Step 5: Configure Environment Variables

  • To add environment variables, click on Add Variable

  • Choose an ENV mode: either a single variable or import variables. Learn more here.

Image showing the Single Variables ENV mode on Triggr Apps.
Single variable ENV mode

To deploy your .NET core application on Triggr, you need to set the URL for the application as an environment variable which can either be DOTNET_URLS or ASPNETCORE_URLS. Since this is an ASP.NET Core application, we will set;

key: ASPNETCORE_URLS
value: http://0.0.0.0:3022
  • Add the key-value pairs and Click on Save

  • Click on NEXT

Image showing environment variables added during app deployment on Triggr Apps.
Adding environment variables

Step 6: Setup Notifications (optional)

  • To configure the notification settings of the application, click on Add Alert

  • Select the Alert type. For this tutorial, we will set up Email alerts.

  • Toggle on the buttons of the deployment event (failed, timed out, or success) you want to be notified of.

  • Enter the Email address where you want to receive alerts. (You can add multiple email addresses)

  • Click on Save

  • Click on Deploy

A gif showing how to set up notifications on Triggr Apps.
Notifications set up and creation of .NET Core application on Triggr

Step 7: Test and Verify the app

  • Click on Go to Dashboard. Your app will be visible on the Triggr apps dashboard.

  • After the app deployment is complete, the app status changes from deploying to running

An image of the overview of a successfully deployed Dotnet application on Triggr Apps.
.NET Core application dashboard overview
  • Click on 🌐 Website at the top right corner of the page, this opens the URL of the deployed application in your browser.

  • You can test the application functionalities.

An image of the Dotnet application running on Triggr on the web.
.NET Core application running from Triggr on a cloud virtual machine

You have deployed a .NET core application successfully on Triggr. You can manage it directly from the app dashboard by clicking the three dots (...) at the top-right corner to access Edit, Instant Rollback, Scale, Pause, and Delete options.

Additionally, you can switch to different tabs on the application dashboard to perform the following actions; view your deployment history, view or download logs, add a custom domain, and view the environment variables.

Conclusion

Congratulations 🎉 on successfully deploying a .NET Core application on Clouddley Triggr!. Feel free to explore the source code for this application here. Furthermore, you can explore our how-to guides to discover how various frameworks can be deployed on Clouddley Triggr.

Last updated

Was this helpful?