This commit is contained in:
2023-03-27 21:26:30 +02:00
parent a7eebf8f38
commit 9b914b211d
13 changed files with 391 additions and 320 deletions

2
.gitignore vendored
View File

@@ -40,3 +40,5 @@
Back/skydiveLogs-api/Data/JumpsDb.db
Back/skydiveLogs-api/Data/JumpsDb-log.db
/Back/skydiveLogs-api.Domain/bin/Release/net5.0/skydiveLogs-api.Domain.deps.json
/Back/skydiveLogs-api.Domain/bin/Debug/net6.0
Back/skydiveLogs-api/Data/JumpsDb.db

35
Back/.vscode/launch.json vendored Normal file
View File

@@ -0,0 +1,35 @@
{
"version": "0.2.0",
"configurations": [
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"name": ".NET Core Launch (web)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/skydiveLogs-api/bin/Debug/net6.0/skydiveLogs-api.dll",
"args": [],
"cwd": "${workspaceFolder}/skydiveLogs-api",
"stopAtEntry": false,
// Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
"serverReadyAction": {
"action": "openExternally",
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"sourceFileMap": {
"/Views": "${workspaceFolder}/Views"
}
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach"
}
]
}

41
Back/.vscode/tasks.json vendored Normal file
View File

@@ -0,0 +1,41 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/skydiveLogs-api/skydiveLogs-api.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/skydiveLogs-api/skydiveLogs-api.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"--project",
"${workspaceFolder}/skydiveLogs-api/skydiveLogs-api.csproj"
],
"problemMatcher": "$msCompile"
}
]
}

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>skydiveLogs_api.Domain</RootNamespace>
</PropertyGroup>

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>skydiveLogs_api.DomainBusiness</RootNamespace>
</PropertyGroup>

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>skydiveLogs_api.DomainService</RootNamespace>
</PropertyGroup>

View File

@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>skydiveLogs_api.Infrastructure</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="LiteDB" Version="5.0.11" />
<PackageReference Include="LiteDB" Version="5.0.12" />
</ItemGroup>
<ItemGroup>

View File

@@ -1,12 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>skydiveLogs_api.Ioc</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
</ItemGroup>
<ItemGroup>
@@ -14,13 +16,4 @@
<ProjectReference Include="..\skydiveLogs-api.DomainBusiness\skydiveLogs-api.DomainBusiness.csproj" />
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.Extensions.Configuration.Abstractions">
<HintPath>..\..\..\..\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.extensions.configuration.abstractions\2.2.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.Abstractions.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions">
<HintPath>..\..\..\..\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.extensions.dependencyinjection.abstractions\2.2.0\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
</Reference>
</ItemGroup>
</Project>

View File

@@ -48,8 +48,8 @@ namespace skydiveLogs_api
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc(options => { options.EnableEndpointRouting = false; })
.SetCompatibilityVersion(CompatibilityVersion.Version_3_0);
services.AddMvc(options => { options.EnableEndpointRouting = false; });
//.SetCompatibilityVersion(CompatibilityVersion.Version_3_0);
services.AddHttpContextAccessor();

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
<RootNamespace>skydiveLogs_api</RootNamespace>
<UserSecretsId>9d7d268e-ee4d-43a2-a9b7-5b00b516f6f8</UserSecretsId>
@@ -18,11 +18,11 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="AutoMapper" Version="10.1.1" />
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="8.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.9" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="5.0.2" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.12.0" />
<PackageReference Include="AutoMapper" Version="12.0.0" />
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.11" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.10" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.25.1" />
</ItemGroup>
<ItemGroup>

View File

@@ -9,7 +9,7 @@
<WebStackScaffolding_IsReferencingScriptLibrariesSelected>True</WebStackScaffolding_IsReferencingScriptLibrariesSelected>
<WebStackScaffolding_LayoutPageFile />
<WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected>
<NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile>
<NameOfLastUsedPublishProfile>C:\Projects\SkydiveLogs\Back\skydiveLogs-api\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
<ShowAllFiles>false</ShowAllFiles>
<ActiveDebugProfile>skydiveLogs_api</ActiveDebugProfile>
</PropertyGroup>

View File

@@ -1,6 +1,6 @@
#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:5.0.6-buster-slim-amd64 AS base
FROM mcr.microsoft.com/dotnet/aspnet:7.0.4-buster-slim-amd64 AS base
WORKDIR /app
EXPOSE 80

View File

@@ -1,6 +1,6 @@
To build an image "toto" with the version "0.1": docker build . -t skydivelogs:1.2.6
To build an image "toto" with the version "0.1": docker build . -t skydivelogs:1.3.2
To run ab image to container with volume : docker run -v C:\toto\logs\config:/app/Front/config -v C:\toto\logs\db:/app/API/Data -p 5080:80/tcp --name Test -it skydivelogs:0.1
docker save --output skydivelogs-1.2.6.tar skydivelogs:1.2.6
docker save --output skydivelogs-1.3.2.tar skydivelogs:1.3.2
scp -P 5022 skydivelogs-1.2.6.tar administrator@51.75.68.58:~
scp -P 5022 skydivelogs-1.3.2.tar administrator@51.75.68.58:~