When creating a new application on your server, a variety of configuration options are available to you:
Dotnet Engine supports the following .NET versions:
Dotnet Engine supports the following types of ASP.NET applications:
After creating your application, you will need to link your Github repository and the branch you want to deploy.
You will also need to provide the path to your .csproj file that you want to be built and deployed.
If your application needs environment specific values, like a database connection string or API keys, you can add them to your apps .env or appsettings.Secret.json file in Dotnet Engine.
These files only exists on your server and are never added to your source control.
The appsettings.Secret.json file is added to your application during the build process by Dotnet Engine. It provides the ability to add environment specific values to your app securely.
You can edit your appsettings.Secret.json file on your apps app-config page in Dotnet Engine.
You can tell your app to use the appsettings.Secret.json file by adding it as an optional json config in your Program.cs
file.
var builder = WebApplication.CreateBuilder(args);
builder
.Configuration
.AddJsonFile("appsettings.Secret.json", optional: true, reloadOnChange: true);
You can also make environment specific variables accessable to your app via environment variables. Dotnet Engine does this by including a .env file to your apps Docker container.
You can add environment variables to the .env file on your apps environment page in Dotnet Engine.
You can access environment variables in your app by using the Environment.GetEnvironmentVariable
method.
var apiKey = Environment.GetEnvironmentVariable("SOME_API_KEY");
You can trigger deploys for you app after linking your repo in your apps dashboard page in Dotnet Engine.
The most recent commit in your linked repo will be deployed
Your application will be deployed in a docker container. Each deployment will tear down the container of your last deployment and create a new container.
It is recommended to setup your DNS records prior to your first deploy.
You can find instructions on setting up your DNS records here
Once your deployment is finished, you can view all of the deployment output in your servers event logs. This can be very helpful for debugging failed deployments.
To view your applications at an actual URL, you will need to setup your DNS records wherever you purchased your domain.
It is important you enter this correctly. Dotnet Engine will setup the proper NGINX configurations with this domain name.
When setting up DNS Records, you will need your server’s public IP address. This can be found on your server page in Dotnet Engine.
As an example, if your domain is mydomain.com, you would need to setup the following DNS records:
Record 1:
Record 2:
If you want your app on a subdomain, you will only need 1 DNS record.
As an example, if your domain was test.mydomain.com, you would need to setup the following record: