.net10 and few fixes
Some checks failed
Build Docker Images / build-and-push (push) Failing after 11s
Some checks failed
Build Docker Images / build-and-push (push) Failing after 11s
This commit is contained in:
9
.gitignore
vendored
9
.gitignore
vendored
@@ -24,10 +24,6 @@ Generated/
|
|||||||
*.db-shm
|
*.db-shm
|
||||||
*.db-wal
|
*.db-wal
|
||||||
|
|
||||||
# Visual Studio Code
|
|
||||||
.vscode/
|
|
||||||
.vscode/*
|
|
||||||
|
|
||||||
# MAUI / Mobile (Xcode/iOS)
|
# MAUI / Mobile (Xcode/iOS)
|
||||||
**/bin/
|
**/bin/
|
||||||
**/obj/
|
**/obj/
|
||||||
@@ -86,3 +82,8 @@ nunit-*.xml
|
|||||||
.idea/indexLayout.xml
|
.idea/indexLayout.xml
|
||||||
.idea/tasks.xml
|
.idea/tasks.xml
|
||||||
.idea/.idea_modules
|
.idea/.idea_modules
|
||||||
|
|
||||||
|
# VSCode - ignore personal settings but keep shared configs
|
||||||
|
.vscode/*
|
||||||
|
!.vscode/launch.json
|
||||||
|
!.vscode/tasks.json
|
||||||
47
.vscode/launch.json
vendored
Normal file
47
.vscode/launch.json
vendored
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
{
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "API",
|
||||||
|
"type": "coreclr",
|
||||||
|
"request": "launch",
|
||||||
|
"preLaunchTask": "build-api",
|
||||||
|
"program": "${workspaceFolder}/BimAI.API/bin/Debug/net10.0/BimAI.API.dll",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}/BimAI.API",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"env": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Web",
|
||||||
|
"type": "coreclr",
|
||||||
|
"request": "launch",
|
||||||
|
"preLaunchTask": "build-web",
|
||||||
|
"program": "${workspaceFolder}/BimAI.UI.Web/bin/Debug/net10.0/BimAI.UI.Web.dll",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}/BimAI.UI.Web",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"serverReadyAction": {
|
||||||
|
"action": "openExternally",
|
||||||
|
"pattern": "\\bNow listening on:\\s+(https?://\\S+)",
|
||||||
|
"uriFormat": "%s"
|
||||||
|
},
|
||||||
|
"env": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
},
|
||||||
|
"launchBrowser": {
|
||||||
|
"enabled": true,
|
||||||
|
"args": "${auto-detect-url}",
|
||||||
|
"browser": [
|
||||||
|
{
|
||||||
|
"osx": "Google Chrome",
|
||||||
|
"linux": "chrome",
|
||||||
|
"windows": "chrome"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
77
.vscode/tasks.json
vendored
Normal file
77
.vscode/tasks.json
vendored
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
{
|
||||||
|
"version": "2.0.0",
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"label": "build-api",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"build",
|
||||||
|
"${workspaceFolder}/BimAI.API/BimAI.API.csproj",
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/consoleloggerparameters:NoSummary;ForceNoAlign"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "build-web",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"build",
|
||||||
|
"${workspaceFolder}/BimAI.UI.Web/BimAI.UI.Web.csproj",
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/consoleloggerparameters:NoSummary;ForceNoAlign"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "publish-api",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"publish",
|
||||||
|
"${workspaceFolder}/BimAI.API/BimAI.API.csproj",
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/consoleloggerparameters:NoSummary;ForceNoAlign"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "publish-web",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"publish",
|
||||||
|
"${workspaceFolder}/BimAI.UI.Web/BimAI.UI.Web.csproj",
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/consoleloggerparameters:NoSummary;ForceNoAlign"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "watch-api",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"watch",
|
||||||
|
"run",
|
||||||
|
"--project",
|
||||||
|
"${workspaceFolder}/BimAI.API/BimAI.API.csproj"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "watch-web",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"watch",
|
||||||
|
"run",
|
||||||
|
"--project",
|
||||||
|
"${workspaceFolder}/BimAI.UI.Web/BimAI.UI.Web.csproj"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -11,12 +11,10 @@
|
|||||||
<PackageReference Include="Hangfire.AspNetCore" Version="1.8.21" />
|
<PackageReference Include="Hangfire.AspNetCore" Version="1.8.21" />
|
||||||
<PackageReference Include="Hangfire.Core" Version="1.8.21" />
|
<PackageReference Include="Hangfire.Core" Version="1.8.21" />
|
||||||
<PackageReference Include="Hangfire.SqlServer" Version="1.8.21" />
|
<PackageReference Include="Hangfire.SqlServer" Version="1.8.21" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="10.0.0-rc.1.25451.107" />
|
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.0-rc.1.25451.107">
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.0-rc.1.25451.107">
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="7.3.2" />
|
|
||||||
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.12.1" />
|
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.12.1" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="10.0.0-rc.1.25451.107" />
|
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="10.0.0-rc.1.25451.107" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -18,8 +18,6 @@ builder.Services.AddScoped<ProductSyncService>();
|
|||||||
|
|
||||||
builder.Services.AddHttpClient();
|
builder.Services.AddHttpClient();
|
||||||
builder.Services.AddControllers();
|
builder.Services.AddControllers();
|
||||||
builder.Services.AddEndpointsApiExplorer();
|
|
||||||
builder.Services.AddSwaggerGen();
|
|
||||||
|
|
||||||
// Start Hangfire section
|
// Start Hangfire section
|
||||||
builder.Services.AddHangfire(configuration => configuration
|
builder.Services.AddHangfire(configuration => configuration
|
||||||
@@ -110,11 +108,6 @@ using (var scope = app.Services.CreateScope())
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (app.Environment.IsDevelopment())
|
|
||||||
{
|
|
||||||
app.UseSwagger();
|
|
||||||
app.UseSwaggerUI();
|
|
||||||
}
|
|
||||||
|
|
||||||
app.UseHttpsRedirection();
|
app.UseHttpsRedirection();
|
||||||
app.UseCors("AllowAll");
|
app.UseCors("AllowAll");
|
||||||
|
|||||||
@@ -6,20 +6,15 @@ public class HangfireAuthorizationFilter: IDashboardAsyncAuthorizationFilter
|
|||||||
{
|
{
|
||||||
public Task<bool> AuthorizeAsync(DashboardContext context)
|
public Task<bool> AuthorizeAsync(DashboardContext context)
|
||||||
{
|
{
|
||||||
// just for now
|
|
||||||
// TODO: add auth
|
|
||||||
return Task.FromResult(true);
|
|
||||||
/*
|
|
||||||
var httpContext = context.GetHttpContext();
|
var httpContext = context.GetHttpContext();
|
||||||
|
|
||||||
var env = httpContext.RequestServices.GetService<IWebHostEnvironment>();
|
var env = httpContext.RequestServices.GetService<IWebHostEnvironment>();
|
||||||
if (env.IsDevelopment())
|
if (env != null && env.IsDevelopment())
|
||||||
{
|
{
|
||||||
return Task.FromResult(true);
|
return Task.FromResult(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
var isAuthenticated = httpContext.User.Identity?.IsAuthenticated ?? false;
|
var isAuthenticated = httpContext.User.Identity?.IsAuthenticated ?? false;
|
||||||
return Task.FromResult(isAuthenticated);
|
return Task.FromResult(isAuthenticated);
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
{
|
{
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"DefaultConnection": "Server=localhost,1433;Database=bimai;User Id=sa;Password=BimAI_Dev_Pass_2024!;TrustServerCertificate=True;Encrypt=False",
|
"DefaultConnection": "Server=localhost,1433;Database=bimai;User Id=sa;Password=BimAI_SA_2025x@;TrustServerCertificate=True;Encrypt=False",
|
||||||
"HangfireConnection": "Server=localhost,1433;Database=bimai;User Id=sa;Password=BimAI_Dev_Pass_2024!;TrustServerCertificate=True;Encrypt=False"
|
"HangfireConnection": "Server=localhost,1433;Database=bimai;User Id=sa;Password=BimAI_SA_2025x@;TrustServerCertificate=True;Encrypt=False"
|
||||||
},
|
},
|
||||||
"E5_CRM": {
|
"E5_CRM": {
|
||||||
"ApiKey": "7e50a8a5-f01f-4fbc-8c1b-59f3fc474bb5"
|
"ApiKey": "7e50a8a5-f01f-4fbc-8c1b-59f3fc474bb5"
|
||||||
},
|
},
|
||||||
"GoogleAuth": {
|
"GoogleAuth": {
|
||||||
"ClientId": "1057234319293-r17ocvs40chitgoj4s83nrfd5409rlc4.apps.googleusercontent.com"
|
"ClientId": "896226687615-rhmqk06t1hvll1hh2gtje2u6nbadtras.apps.googleusercontent.com"
|
||||||
},
|
},
|
||||||
"JwtSettings": {
|
"JwtSettings": {
|
||||||
"SecretKey": "BimAISuperSecretKeyThatMustBeAtLeast32CharactersLong123456789"
|
"SecretKey": "BimAISuperSecretKeyThatMustBeAtLeast32CharactersLong123456789"
|
||||||
|
|||||||
@@ -70,14 +70,14 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="10.0.0-rc.1.25451.107"/>
|
<PackageReference Include="Microsoft.Extensions.Configuration" Version="10.0.0"/>
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="10.0.0-rc.1.25451.107"/>
|
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="10.0.0"/>
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="10.0.0-rc.1.25451.107"/>
|
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="10.0.0"/>
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="10.0.0-rc.1.25451.107"/>
|
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="10.0.0"/>
|
||||||
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)"/>
|
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)"/>
|
||||||
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiVersion)"/>
|
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiVersion)"/>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="$(MauiVersion)"/>
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="$(MauiVersion)"/>
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="10.0.0-rc.1.25451.107"/>
|
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="10.0.0"/>
|
||||||
<PackageReference Include="MudBlazor" Version="8.8.0"/>
|
<PackageReference Include="MudBlazor" Version="8.8.0"/>
|
||||||
<PackageReference Include="ZXing.Net.MAUI" Version="0.4.0"/>
|
<PackageReference Include="ZXing.Net.MAUI" Version="0.4.0"/>
|
||||||
<PackageReference Include="ZXing.Net.MAUI.Controls" Version="0.4.0"/>
|
<PackageReference Include="ZXing.Net.MAUI.Controls" Version="0.4.0"/>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"GoogleAuth": {
|
"GoogleAuth": {
|
||||||
"ClientId": "1057234319293-r17ocvs40chitgoj4s83nrfd5409rlc4.apps.googleusercontent.com"
|
"ClientId": "896226687615-rhmqk06t1hvll1hh2gtje2u6nbadtras.apps.googleusercontent.com"
|
||||||
},
|
},
|
||||||
"ApiSettings": {
|
"ApiSettings": {
|
||||||
"BaseUrl": "http://localhost:7142"
|
"BaseUrl": "http://localhost:7142"
|
||||||
|
|||||||
@@ -51,8 +51,6 @@ Global
|
|||||||
{7ACBFE74-E72C-4033-9172-30512233A518}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{7ACBFE74-E72C-4033-9172-30512233A518}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{7ACBFE74-E72C-4033-9172-30512233A518}.Release|Any CPU.Build.0 = Release|Any CPU
|
{7ACBFE74-E72C-4033-9172-30512233A518}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{12FB8E56-08C1-47CF-B0FC-4BE9F01F020A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{12FB8E56-08C1-47CF-B0FC-4BE9F01F020A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{12FB8E56-08C1-47CF-B0FC-4BE9F01F020A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{12FB8E56-08C1-47CF-B0FC-4BE9F01F020A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{12FB8E56-08C1-47CF-B0FC-4BE9F01F020A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{12FB8E56-08C1-47CF-B0FC-4BE9F01F020A}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
|
|||||||
@@ -1,49 +0,0 @@
|
|||||||
services:
|
|
||||||
mssql:
|
|
||||||
image: mcr.microsoft.com/mssql/server:2022-latest
|
|
||||||
container_name: bimai-mssql
|
|
||||||
hostname: bimai-mssql
|
|
||||||
environment:
|
|
||||||
- ACCEPT_EULA=Y
|
|
||||||
- SA_PASSWORD=BimAI_Dev_Pass_2024!
|
|
||||||
- MSSQL_PID=Developer
|
|
||||||
ports:
|
|
||||||
- "1433:1433"
|
|
||||||
volumes:
|
|
||||||
- mssql-data:/var/opt/mssql
|
|
||||||
networks:
|
|
||||||
- bimai-network
|
|
||||||
healthcheck:
|
|
||||||
test: /opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P "BimAI_Dev_Pass_2024!" -C -Q "SELECT 1" || exit 1
|
|
||||||
interval: 10s
|
|
||||||
timeout: 3s
|
|
||||||
retries: 10
|
|
||||||
start_period: 10s
|
|
||||||
|
|
||||||
init-mssql:
|
|
||||||
image: mcr.microsoft.com/mssql/server:2022-latest
|
|
||||||
container_name: bimai-init-mssql
|
|
||||||
restart: "no"
|
|
||||||
networks:
|
|
||||||
- bimai-network
|
|
||||||
depends_on:
|
|
||||||
mssql:
|
|
||||||
condition: service_healthy
|
|
||||||
environment:
|
|
||||||
- MSSQL_SA_PASSWORD=BimAI_Dev_Pass_2024!
|
|
||||||
entrypoint: >-
|
|
||||||
bash -lc "
|
|
||||||
set -e
|
|
||||||
for i in {1..30}; do
|
|
||||||
/opt/mssql-tools18/bin/sqlcmd -S bimai-mssql -U sa -P \"$$MSSQL_SA_PASSWORD\" -C -Q \"SELECT 1\" && break || sleep 2;
|
|
||||||
done;
|
|
||||||
/opt/mssql-tools18/bin/sqlcmd -S bimai-mssql -U sa -P \"$$MSSQL_SA_PASSWORD\" -C -Q \"IF NOT EXISTS (SELECT name FROM sys.databases WHERE name = N'bimai') CREATE DATABASE [bimai];\"
|
|
||||||
"
|
|
||||||
|
|
||||||
networks:
|
|
||||||
bimai-network:
|
|
||||||
driver: bridge
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
mssql-data:
|
|
||||||
name: bimai-mssql-data
|
|
||||||
Reference in New Issue
Block a user