commit 56d93c4c33efae8983146477004174068d49ca9f Author: David Claeys Date: Fri Nov 28 10:38:38 2025 +0100 init project diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..fe1152b --- /dev/null +++ b/.dockerignore @@ -0,0 +1,30 @@ +**/.classpath +**/.dockerignore +**/.env +**/.git +**/.gitignore +**/.project +**/.settings +**/.toolstarget +**/.vs +**/.vscode +**/*.*proj.user +**/*.dbmdl +**/*.jfm +**/azds.yaml +**/bin +**/charts +**/docker-compose* +**/Dockerfile* +**/node_modules +**/npm-debug.log +**/obj +**/secrets.dev.yaml +**/values.dev.yaml +LICENSE +README.md +!**/.gitignore +!.git/HEAD +!.git/config +!.git/packed-refs +!.git/refs/heads/** \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d859cae --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +obj/ +bin/ +.vs/ +*/*.identifier +/out +*.db +/infobelApi/out +/infobelApi/infobelApi.csproj.user +/infobelApi.csproj.user +/infobelApi.csproj.user +/infobelApi/infobelApi.json diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e387c74 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM mcr.microsoft.com/dotnet/sdk:10.0-alpine-amd64 AS build-env +WORKDIR /App +COPY . ./ +# Restore dependencies for your application +RUN dotnet restore +# Build your application +RUN dotnet publish TideFin.Server --no-restore --self-contained false -c Release -o out /p:UseAppHost=false + + +FROM git.claeyscloud.com/david/net-base:10.0.0-alpine-22 +WORKDIR /App +# copy build files from build-stage +COPY --from=build-env /App/out . +# change ownership of files to the app user +RUN chown -R app:app /App/ +# entrypoint for image +ENTRYPOINT ["dotnet", "TideFin.Server.dll"] \ No newline at end of file diff --git a/Program.cs b/Program.cs new file mode 100644 index 0000000..48863a6 --- /dev/null +++ b/Program.cs @@ -0,0 +1,25 @@ +var builder = WebApplication.CreateBuilder(args); + +// Add services to the container. + +builder.Services.AddControllers(); +// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle +builder.Services.AddEndpointsApiExplorer(); +builder.Services.AddSwaggerGen(); + +var app = builder.Build(); + +// Configure the HTTP request pipeline. +if (app.Environment.IsDevelopment()) +{ + app.UseSwagger(); + app.UseSwaggerUI(); +} + +app.UseHttpsRedirection(); + +app.UseAuthorization(); + +app.MapControllers(); + +app.Run(); diff --git a/Properties/launchSettings.json b/Properties/launchSettings.json new file mode 100644 index 0000000..e2433f0 --- /dev/null +++ b/Properties/launchSettings.json @@ -0,0 +1,52 @@ +{ + "profiles": { + "http": { + "commandName": "Project", + "launchBrowser": true, + "launchUrl": "swagger", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "dotnetRunMessages": true, + "applicationUrl": "http://localhost:5063" + }, + "https": { + "commandName": "Project", + "launchBrowser": true, + "launchUrl": "swagger", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "dotnetRunMessages": true, + "applicationUrl": "https://localhost:7005;http://localhost:5063" + }, + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "launchUrl": "swagger", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "Container (Dockerfile)": { + "commandName": "Docker", + "launchBrowser": true, + "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/swagger", + "environmentVariables": { + "ASPNETCORE_HTTPS_PORTS": "8081", + "ASPNETCORE_HTTP_PORTS": "8080" + }, + "publishAllPorts": true, + "useSSL": true + } + }, + "$schema": "http://json.schemastore.org/launchsettings.json", + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:16585", + "sslPort": 44334 + } + } +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/TideFin.Server.csproj b/TideFin.Server.csproj new file mode 100644 index 0000000..623ffaf --- /dev/null +++ b/TideFin.Server.csproj @@ -0,0 +1,21 @@ + + + + net10.0 + enable + enable + c40713b7-7556-4b39-b57c-0abf905d7931 + Linux + . + + + + + + + + + + + + diff --git a/TideFin.Server.csproj.user b/TideFin.Server.csproj.user new file mode 100644 index 0000000..dd2d54c --- /dev/null +++ b/TideFin.Server.csproj.user @@ -0,0 +1,6 @@ + + + + Container (Dockerfile) + + \ No newline at end of file diff --git a/TideFin.Server.sln b/TideFin.Server.sln new file mode 100644 index 0000000..120eac3 --- /dev/null +++ b/TideFin.Server.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.13.35828.75 d17.13 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TideFin.Server", "TideFin.Server.csproj", "{A490AE24-F8ED-46CB-9E86-3F22468485E9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A490AE24-F8ED-46CB-9E86-3F22468485E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A490AE24-F8ED-46CB-9E86-3F22468485E9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A490AE24-F8ED-46CB-9E86-3F22468485E9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A490AE24-F8ED-46CB-9E86-3F22468485E9}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {FF2D8828-8058-439B-B8AF-38230377B831} + EndGlobalSection +EndGlobal diff --git a/appsettings.Development.json b/appsettings.Development.json new file mode 100644 index 0000000..0c208ae --- /dev/null +++ b/appsettings.Development.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + } +} diff --git a/appsettings.json b/appsettings.json new file mode 100644 index 0000000..10f68b8 --- /dev/null +++ b/appsettings.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*" +}