diff --git a/Sources/.dockerignore b/Sources/.dockerignore new file mode 100644 index 0000000..3729ff0 --- /dev/null +++ b/Sources/.dockerignore @@ -0,0 +1,25 @@ +**/.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 \ No newline at end of file diff --git a/Sources/Api-lol/Api-lol.csproj b/Sources/Api-lol/Api-lol.csproj index 7aaea74..623dfd4 100644 --- a/Sources/Api-lol/Api-lol.csproj +++ b/Sources/Api-lol/Api-lol.csproj @@ -5,9 +5,12 @@ enable enable Api_lol + 00525c0a-0d72-440c-bf49-1c73c88bc527 + Linux + diff --git a/Sources/Api-lol/Dockerfile b/Sources/Api-lol/Dockerfile new file mode 100644 index 0000000..77830b6 --- /dev/null +++ b/Sources/Api-lol/Dockerfile @@ -0,0 +1,26 @@ +#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. + +FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base +WORKDIR /app +EXPOSE 80 +EXPOSE 443 + +FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build +WORKDIR /src +COPY ["Api-lol/Api-lol.csproj", "Api-lol/"] +COPY ["DTO/DTO.csproj", "DTO/"] +COPY ["Model/Model.csproj", "Model/"] +COPY ["Shared/Shared.csproj", "Shared/"] +COPY ["StubLib/StubLib.csproj", "StubLib/"] +RUN dotnet restore "Api-lol/Api-lol.csproj" +COPY . . +WORKDIR "/src/Api-lol" +RUN dotnet build "Api-lol.csproj" -c Release -o /app/build + +FROM build AS publish +RUN dotnet publish "Api-lol.csproj" -c Release -o /app/publish /p:UseAppHost=false + +FROM base AS final +WORKDIR /app +COPY --from=publish /app/publish . +ENTRYPOINT ["dotnet", "Api-lol.dll"] \ No newline at end of file diff --git a/Sources/Api-lol/Properties/launchSettings.json b/Sources/Api-lol/Properties/launchSettings.json index 920d3f6..f0924b6 100644 --- a/Sources/Api-lol/Properties/launchSettings.json +++ b/Sources/Api-lol/Properties/launchSettings.json @@ -1,23 +1,14 @@ -{ - "$schema": "https://json.schemastore.org/launchsettings.json", - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:64167", - "sslPort": 44356 - } - }, +{ "profiles": { "Api_lol": { "commandName": "Project", - "dotnetRunMessages": true, "launchBrowser": true, "launchUrl": "swagger", - "applicationUrl": "https://localhost:7081;http://localhost:5206", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" - } + }, + "dotnetRunMessages": true, + "applicationUrl": "https://localhost:7081;http://localhost:5206" }, "IIS Express": { "commandName": "IISExpress", @@ -26,6 +17,22 @@ "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } + }, + "Docker": { + "commandName": "Docker", + "launchBrowser": true, + "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/swagger", + "publishAllPorts": true, + "useSSL": true + } + }, + "$schema": "https://json.schemastore.org/launchsettings.json", + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:64167", + "sslPort": 44356 } } -} +} \ No newline at end of file