switched to self signed https

This commit is contained in:
DouweRavers
2025-04-17 15:22:31 +02:00
parent ef528aa10f
commit 6f03c84264
6 changed files with 14 additions and 3 deletions

View File

@@ -1,7 +1,8 @@
# Use the official ASP.NET Core runtime as a parent image
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
WORKDIR /app
EXPOSE 5000
EXPOSE 5000 5001
ENV ASPNETCORE_URLS=https://*:5001;http://*:5000
# Use the SDK image to build the app
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
@@ -19,4 +20,5 @@ RUN dotnet publish "douwco.be.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
COPY ["./certificate.pfx", "/app/certificate.pfx"]
ENTRYPOINT ["dotnet", "douwco.be.dll"]

View File

@@ -1,5 +1,14 @@
var builder = WebApplication.CreateBuilder(args);
builder.WebHost.UseUrls("http://*:5000");
builder.WebHost.ConfigureKestrel(options =>
{
options.ListenAnyIP(5001, listenOptions =>
{
listenOptions.UseHttps("/app/certificate.pfx", "douwco_website");
});
});
var app = builder.Build();
app.UseStaticFiles();

BIN
certificate.pfx Normal file

Binary file not shown.

View File

@@ -13,7 +13,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("douwco.be")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+40bc778f29b5fd32a057f7dc38a67df115078301")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+ef528aa10f4b3023fcb0b390f9bc3fbb9e556310")]
[assembly: System.Reflection.AssemblyProductAttribute("douwco.be")]
[assembly: System.Reflection.AssemblyTitleAttribute("douwco.be")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

View File

@@ -1 +1 @@
b66fe98ff0bcbc21f45df330d12f67895e13da8431f3c9c8386e535dcf228e2b
af406788523d4d8abd228b688c7e0a51b47a570d106336ab61c277d07f20bb78