From 6f6a77f897fcac6e1b9c5bf8c6cd8aaead65c8f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Henrique=20Ivanchechen?= Date: Wed, 23 Aug 2023 11:01:09 -0300 Subject: [PATCH] adicionando pasta para ASP.NET --- .../Controllers}/ImageController.cs | 0 .../Controllers}/StatusController.cs | 2 +- ASP.NET/Dockerfile | 20 +++++++++++++++++++ ImageHelper.cs => ASP.NET/ImageHelper.cs | 0 Program.cs => ASP.NET/Program.cs | 1 - .../Properties}/Resources.Designer.cs | 0 .../Properties}/Resources.resx | 0 .../Properties}/launchSettings.json | 2 +- .../Services}/ImageService.cs | 0 TCC.APP.csproj => ASP.NET/TCC.APP.csproj | 2 +- TCC.APP.sln => ASP.NET/TCC.APP.sln | 0 .../appsettings.Development.json | 0 ASP.NET/appsettings.json | 9 +++++++++ appsettings.json | 9 --------- 14 files changed, 32 insertions(+), 13 deletions(-) rename {Controllers => ASP.NET/Controllers}/ImageController.cs (100%) rename {Controllers => ASP.NET/Controllers}/StatusController.cs (93%) create mode 100644 ASP.NET/Dockerfile rename ImageHelper.cs => ASP.NET/ImageHelper.cs (100%) rename Program.cs => ASP.NET/Program.cs (93%) rename {Properties => ASP.NET/Properties}/Resources.Designer.cs (100%) rename {Properties => ASP.NET/Properties}/Resources.resx (100%) rename {Properties => ASP.NET/Properties}/launchSettings.json (93%) rename {Services => ASP.NET/Services}/ImageService.cs (100%) rename TCC.APP.csproj => ASP.NET/TCC.APP.csproj (95%) rename TCC.APP.sln => ASP.NET/TCC.APP.sln (100%) rename appsettings.Development.json => ASP.NET/appsettings.Development.json (100%) create mode 100644 ASP.NET/appsettings.json delete mode 100644 appsettings.json 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": "*" -}