- Upgrade from .NET Core 3.1 to .NET 10, SSH.NET 2016.1.0 to 2024.1.0 - Fix ServerData JSON deserialization crash with boolean lsblk fields (#13) - Fix DiskFreeResult.Parse overflow with TryParse and null safety (#20) - Fix SSH connection issues via SSH.NET library upgrade (#22) - Fix bash generation to detect existing btcpayserver-docker dir (#5) - Add disk space and server resources display in Summary page (#6) - Add FastSync support for initial Bitcoin sync (#9) - Add SSH key authentication for remote deployments (#23) - Replace CircleCI with GitHub Actions publishing to GHCR and Docker Hub (#24) - Add unified multi-arch Dockerfile using Docker Buildx (#24) - Make additional services data-driven via ServiceRegistry (#27) - Add CloudInit deployment type for VPS provisioning (#28) - Fix Summary page duplicate Libre Patron entry and typos (#26) - Replace deprecated WebClient with IHttpClientFactory - Remove Startup.cs in favor of minimal hosting in Program.cs - Fix ThunderHub validation targeting wrong model property
38 lines
900 B
C#
38 lines
900 B
C#
using BTCPayServerDockerConfigurator;
|
|
using BTCPayServerDockerConfigurator.Models;
|
|
using Microsoft.Extensions.Options;
|
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
builder.Configuration.AddEnvironmentVariables(prefix: "CONFIGURATOR_");
|
|
|
|
builder.Services.AddControllersWithViews()
|
|
.AddRazorRuntimeCompilation()
|
|
.AddSessionStateTempDataProvider();
|
|
builder.Services.AddConfigurator();
|
|
|
|
var app = builder.Build();
|
|
|
|
if (!app.Environment.IsDevelopment())
|
|
{
|
|
app.UseHsts();
|
|
}
|
|
|
|
app.UseForwardedHeaders();
|
|
app.UseHttpsRedirection();
|
|
|
|
var options = app.Services.GetRequiredService<IOptions<ConfiguratorOptions>>();
|
|
if (!string.IsNullOrEmpty(options.Value.RootPath))
|
|
{
|
|
app.UsePathBase(options.Value.RootPath);
|
|
}
|
|
app.UseStaticFiles();
|
|
app.UseRouting();
|
|
app.UseSession();
|
|
app.UseAuthorization();
|
|
|
|
app.MapControllerRoute(
|
|
name: "default",
|
|
pattern: "{action=Index}/{id?}");
|
|
|
|
app.Run();
|