Initial .NET API service

This commit is contained in:
AppFactory Bot
2026-06-12 10:26:56 +00:00
commit bbec747bb7
6 changed files with 60 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
bin/
obj/
.git/
+11
View File
@@ -0,0 +1,11 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src
COPY . .
RUN dotnet publish "Idoklad.csproj" -c Release -o /app/publish
FROM mcr.microsoft.com/dotnet/aspnet:8.0
WORKDIR /app
ENV ASPNETCORE_URLS=http://+:8080
EXPOSE 8080
COPY --from=build /app/publish .
ENTRYPOINT ["dotnet", "Idoklad.dll"]
+7
View File
@@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
</Project>
+22
View File
@@ -0,0 +1,22 @@
var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();
var rootPath = Environment.GetEnvironmentVariable("ROOT_PATH");
if (!string.IsNullOrWhiteSpace(rootPath))
{
app.UsePathBase(rootPath);
}
app.MapGet("/", () => Results.Json(new
{
name = "iDoklad",
service = "idoklad",
status = "ok"
}));
app.MapGet("/health", () => Results.Json(new
{
status = "ok"
}));
app.Run();
+8
View File
@@ -0,0 +1,8 @@
# iDoklad
.NET API služba vytvořená přes CSBot Services Portal.
## Endpointy
- GET /
- GET /health
+9
View File
@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}