diff --git a/Controllers/ImageController.cs b/ASP.NET/Controllers/ImageController.cs similarity index 100% rename from Controllers/ImageController.cs rename to ASP.NET/Controllers/ImageController.cs diff --git a/Controllers/StatusController.cs b/ASP.NET/Controllers/StatusController.cs similarity index 93% rename from Controllers/StatusController.cs rename to ASP.NET/Controllers/StatusController.cs index fb1416e..1b621ce 100644 --- a/Controllers/StatusController.cs +++ b/ASP.NET/Controllers/StatusController.cs @@ -3,7 +3,7 @@ namespace TCC.Controllers { [ApiController] - [Route("")] + [Route("status")] public class StatusController : ControllerBase { public StatusController() { } diff --git a/ASP.NET/Dockerfile b/ASP.NET/Dockerfile new file mode 100644 index 0000000..1ec4fc2 --- /dev/null +++ b/ASP.NET/Dockerfile @@ -0,0 +1,20 @@ +FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine AS build-env +WORKDIR /App + +# Copy everything +COPY * . + +# Restore as distinct layers +RUN dotnet restore + +# Build a release +RUN dotnet build -c Release -o out + +# Build runtime image +FROM mcr.microsoft.com/dotnet/aspnet:6.0-alpine + +WORKDIR /App + +COPY --from=build-env /App/out . + +ENTRYPOINT ["dotnet", "TCC.APP.dll"] \ No newline at end of file diff --git a/ImageHelper.cs b/ASP.NET/ImageHelper.cs similarity index 100% rename from ImageHelper.cs rename to ASP.NET/ImageHelper.cs diff --git a/Program.cs b/ASP.NET/Program.cs similarity index 93% rename from Program.cs rename to ASP.NET/Program.cs index 7c196b8..1a6b4d7 100644 --- a/Program.cs +++ b/ASP.NET/Program.cs @@ -1,4 +1,3 @@ -using Microsoft.AspNetCore.Http.Features; using Microsoft.AspNetCore.Server.Kestrel.Core; using TCC.Services; diff --git a/Properties/Resources.Designer.cs b/ASP.NET/Properties/Resources.Designer.cs similarity index 100% rename from Properties/Resources.Designer.cs rename to ASP.NET/Properties/Resources.Designer.cs diff --git a/Properties/Resources.resx b/ASP.NET/Properties/Resources.resx similarity index 100% rename from Properties/Resources.resx rename to ASP.NET/Properties/Resources.resx diff --git a/Properties/launchSettings.json b/ASP.NET/Properties/launchSettings.json similarity index 93% rename from Properties/launchSettings.json rename to ASP.NET/Properties/launchSettings.json index dbc3255..c972bd3 100644 --- a/Properties/launchSettings.json +++ b/ASP.NET/Properties/launchSettings.json @@ -14,7 +14,7 @@ "dotnetRunMessages": true, "launchBrowser": false, "launchUrl": "weatherforecast", - "applicationUrl": "http://localhost:5100", + "applicationUrl": "http://0.0.0.0:5100", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } diff --git a/Services/ImageService.cs b/ASP.NET/Services/ImageService.cs similarity index 100% rename from Services/ImageService.cs rename to ASP.NET/Services/ImageService.cs diff --git a/TCC.APP.csproj b/ASP.NET/TCC.APP.csproj similarity index 95% rename from TCC.APP.csproj rename to ASP.NET/TCC.APP.csproj index 18b136c..d25e5e8 100644 --- a/TCC.APP.csproj +++ b/ASP.NET/TCC.APP.csproj @@ -5,7 +5,7 @@ enable enable tcc_app - AnyCPU + x64 True diff --git a/TCC.APP.sln b/ASP.NET/TCC.APP.sln similarity index 100% rename from TCC.APP.sln rename to ASP.NET/TCC.APP.sln diff --git a/appsettings.Development.json b/ASP.NET/appsettings.Development.json similarity index 100% rename from appsettings.Development.json rename to ASP.NET/appsettings.Development.json diff --git a/ASP.NET/appsettings.json b/ASP.NET/appsettings.json new file mode 100644 index 0000000..66a6ffe --- /dev/null +++ b/ASP.NET/appsettings.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Trace", + "Microsoft.AspNetCore": "Trace" + } + }, + "AllowedHosts": "*" +} diff --git a/appsettings.json b/appsettings.json deleted file mode 100644 index 10f68b8..0000000 --- a/appsettings.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning" - } - }, - "AllowedHosts": "*" -}