chore: 修复配置文件和Dockerfile问题

main
NoahLan 8 months ago
parent 6ccf2df930
commit 76219dcfc3

@ -1,47 +1,42 @@
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging. #See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
USER app USER app
WORKDIR /app WORKDIR /app
EXPOSE 8080 EXPOSE 8080
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
ARG BUILD_CONFIGURATION=Release ARG BUILD_CONFIGURATION=Release
WORKDIR /src WORKDIR /src
COPY ["src/NPin.Web/NPin.Web.csproj", "src/NPin.Web/"] COPY ["src/NPin.Web/NPin.Web.csproj", "src/NPin.Web/"]
COPY ["framework/NPin.Framework.AspNetCore.Authentication.OAuth/NPin.Framework.AspNetCore.Authentication.OAuth.csproj", "framework/NPin.Framework.AspNetCore.Authentication.OAuth/"] COPY ["framework/NPin.Framework.AspNetCore.Authentication.OAuth/NPin.Framework.AspNetCore.Authentication.OAuth.csproj", "framework/NPin.Framework.AspNetCore.Authentication.OAuth/"]
COPY ["framework/NPin.Framework.AspNetCore/NPin.Framework.AspNetCore.csproj", "framework/NPin.Framework.AspNetCore/"] COPY ["framework/NPin.Framework.AspNetCore/NPin.Framework.AspNetCore.csproj", "framework/NPin.Framework.AspNetCore/"]
COPY ["framework/NPin.Framework.Core/NPin.Framework.Core.csproj", "framework/NPin.Framework.Core/"] COPY ["framework/NPin.Framework.Core/NPin.Framework.Core.csproj", "framework/NPin.Framework.Core/"]
COPY ["src/NPin.Application/NPin.Application.csproj", "src/NPin.Application/"] COPY ["src/NPin.Application/NPin.Application.csproj", "src/NPin.Application/"]
COPY ["framework/NPin.Framework.Ddd.Application/NPin.Framework.Ddd.Application.csproj", "framework/NPin.Framework.Ddd.Application/"] COPY ["framework/NPin.Framework.Ddd.Application/NPin.Framework.Ddd.Application.csproj", "framework/NPin.Framework.Ddd.Application/"]
COPY ["framework/NPin.Framework.Ddd.Application.Contracts/NPin.Framework.Ddd.Application.Contracts.csproj", "framework/NPin.Framework.Ddd.Application.Contracts/"] COPY ["framework/NPin.Framework.Ddd.Application.Contracts/NPin.Framework.Ddd.Application.Contracts.csproj", "framework/NPin.Framework.Ddd.Application.Contracts/"]
COPY ["module/bbs/NPin.Framework.Bbs.Application/NPin.Framework.Bbs.Application.csproj", "module/bbs/NPin.Framework.Bbs.Application/"] COPY ["module/upms/NPin.Framework.Upms.Application/NPin.Framework.Upms.Application.csproj", "module/upms/NPin.Framework.Upms.Application/"]
COPY ["module/rbac/NPin.Framework.Rbac.Application/NPin.Framework.Rbac.Application.csproj", "module/rbac/NPin.Framework.Rbac.Application/"] COPY ["module/upms/NPin.Framework.Upms.Application.Contracts/NPin.Framework.Upms.Application.Contracts.csproj", "module/upms/NPin.Framework.Upms.Application.Contracts/"]
COPY ["module/rbac/NPin.Framework.Rbac.Application.Contracts/NPin.Framework.Rbac.Application.Contracts.csproj", "module/rbac/NPin.Framework.Rbac.Application.Contracts/"] COPY ["module/upms/NPin.Framework.Upms.Domain.Shared/NPin.Framework.Upms.Domain.Shared.csproj", "module/upms/NPin.Framework.Upms.Domain.Shared/"]
COPY ["module/rbac/NPin.Framework.Rbac.Domain.Shared/NPin.Framework.Rbac.Domain.Shared.csproj", "module/rbac/NPin.Framework.Rbac.Domain.Shared/"] COPY ["framework/NPin.Framework.Mapster/NPin.Framework.Mapster.csproj", "framework/NPin.Framework.Mapster/"]
COPY ["framework/NPin.Framework.Mapster/NPin.Framework.Mapster.csproj", "framework/NPin.Framework.Mapster/"] COPY ["framework/NPin.Framework.SqlSugarCore.Abstractions/NPin.Framework.SqlSugarCore.Abstractions.csproj", "framework/NPin.Framework.SqlSugarCore.Abstractions/"]
COPY ["framework/NPin.Framework.SqlSugarCore.Abstractions/NPin.Framework.SqlSugarCore.Abstractions.csproj", "framework/NPin.Framework.SqlSugarCore.Abstractions/"] COPY ["module/upms/NPin.Framework.Upms.Domain/NPin.Framework.Upms.Domain.csproj", "module/upms/NPin.Framework.Upms.Domain/"]
COPY ["module/rbac/NPin.Framework.Rbac.Domain/NPin.Framework.Rbac.Domain.csproj", "module/rbac/NPin.Framework.Rbac.Domain/"] COPY ["src/NPin.Application.Contracts/NPin.Application.Contracts.csproj", "src/NPin.Application.Contracts/"]
COPY ["module/bbs/NPin.Framework.Bbs.Application.Contracts/NPin.Framework.Bbs.Application.Contracts.csproj", "module/bbs/NPin.Framework.Bbs.Application.Contracts/"] COPY ["src/NPin.Domain.Shared/NPin.Domain.Shared.csproj", "src/NPin.Domain.Shared/"]
COPY ["module/bbs/NPin.Framework.Bbs.Domain.Shared/NPin.Framework.Bbs.Domain.Shared.csproj", "module/bbs/NPin.Framework.Bbs.Domain.Shared/"] COPY ["src/NPin.Domain/NPin.Domain.csproj", "src/NPin.Domain/"]
COPY ["module/bbs/NPin.Framework.Bbs.Domain/NPin.Framework.Bbs.Domain.csproj", "module/bbs/NPin.Framework.Bbs.Domain/"] COPY ["src/NPin.SqlSugarCore/NPin.SqlSugarCore.csproj", "src/NPin.SqlSugarCore/"]
COPY ["src/NPin.Application.Contracts/NPin.Application.Contracts.csproj", "src/NPin.Application.Contracts/"] COPY ["framework/NPin.Framework.SqlSugarCore/NPin.Framework.SqlSugarCore.csproj", "framework/NPin.Framework.SqlSugarCore/"]
COPY ["src/NPin.Domain.Shared/NPin.Domain.Shared.csproj", "src/NPin.Domain.Shared/"] COPY ["module/upms/NPin.Framework.Upms.SqlSugarCore/NPin.Framework.Upms.SqlSugarCore.csproj", "module/upms/NPin.Framework.Upms.SqlSugarCore/"]
COPY ["src/NPin.Domain/NPin.Domain.csproj", "src/NPin.Domain/"] RUN dotnet restore "./src/NPin.Web/./NPin.Web.csproj"
COPY ["src/NPin.SqlSugarCore/NPin.SqlSugarCore.csproj", "src/NPin.SqlSugarCore/"] COPY . .
COPY ["framework/NPin.Framework.SqlSugarCore/NPin.Framework.SqlSugarCore.csproj", "framework/NPin.Framework.SqlSugarCore/"] WORKDIR "/src/src/NPin.Web"
COPY ["module/bbs/NPin.Framework.Bbs.SqlSugarCore/NPin.Framework.Bbs.SqlSugarCore.csproj", "module/bbs/NPin.Framework.Bbs.SqlSugarCore/"] RUN dotnet build "./NPin.Web.csproj" -c $BUILD_CONFIGURATION -o /app/build
COPY ["module/rbac/NPin.Framework.Rbac.SqlSugarCore/NPin.Framework.Rbac.SqlSugarCore.csproj", "module/rbac/NPin.Framework.Rbac.SqlSugarCore/"]
RUN dotnet restore "./src/NPin.Web/./NPin.Web.csproj" FROM build AS publish
COPY . . ARG BUILD_CONFIGURATION=Release
WORKDIR "/src/src/NPin.Web" RUN dotnet publish "./NPin.Web.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
RUN dotnet build "./NPin.Web.csproj" -c $BUILD_CONFIGURATION -o /app/build
FROM base AS final
FROM build AS publish WORKDIR /app
ARG BUILD_CONFIGURATION=Release COPY --from=publish /app/publish .
RUN dotnet publish "./NPin.Web.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "NPin.Web.dll"] ENTRYPOINT ["dotnet", "NPin.Web.dll"]

@ -1,8 +0,0 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}

@ -1,66 +1,82 @@
{ {
"Logging": { "Logging": {
"LogLevel": { "LogLevel": {
"Default": "Debug", // "Default": "Information",
"Microsoft.AspNetCore": "Warning" "Default": "Debug",
} "Microsoft.AspNetCore": "Warning"
}, }
"App": { },
"SelfUrl": "http://*:19001", //
"CorsOrigins": "http://localhost:19001;http://localhost:18000" "App": {
}, "SelfUrl": "http://*:19001",
"DbList": [ "CorsOrigins": "http://localhost:19001;http://localhost:18000"
"Sqlite", },
"Mysql", //
"Sqlserver", "DbList": [
"Oracle", "Sqlite",
"Postgresql" "Mysql",
], "Sqlserver",
"DbConnOptions": { "Oracle",
"Url": "DataSource=np-dev.db", "Postgresql"
"DbType": "Sqlite", ],
"EnabledReadWrite": false, "DbConnOptions": {
"EnabledCodeFirst": true, "Url": "DataSource=np-dev.db",
"EnabledSqlLog": true, "DbType": "Sqlite",
"EnabledDbSeed": true, "EnabledReadWrite": false,
"EnabledSaasMultiTenancy": false "EnabledCodeFirst": true,
}, "EnabledSqlLog": true,
"Redis": { "EnabledDbSeed": true,
"IsEnabled": false, // SAAS
"Configuration": "192.168.1.100:6379,password=,defaultDatabase=10" "EnabledSaasMultiTenancy": false,
}, //
"JwtOptions": { //"ReadUrl": [
"Issuer": "NoahLan", // "DataSource=[xxxx]", //Sqlite
"Audience": "NoahLan", // "server=[xxxx];port=3306;database=[xxxx];user id=[xxxx];password=[xxxx]", //Mysql
"SecurityKey": "zqxwcevrbtnymu312412ihe9rfwhe78rh23djoi32hrui3ryf9e8wfh34iuj54y0934uti4h97fgw7hf97wyh8yy69520", // "Data Source=[xxxx];Initial Catalog=[xxxx];User ID=[xxxx];password=[xxxx]" //Sqlserver
"ExpiresMinuteTime": 86400 //]
}, },
"RefreshJwtOptions": { // Redis使freesql FreeSqlOptionsConnectionStringBuilder
"Issuer": "NoahLan", "Redis": {
"Audience": "NoahLan", "IsEnabled": false,
"SecurityKey": "67ij4o6jo4i5j6io45j6i4j74p5k6i54ojoi5t9g8ergoj34ofgkrtbmreog894jbioemgropihj48rj4io5juopjgior", "Configuration": "192.168.1.100:6379,password=,defaultDatabase=10"
"ExpiresMinuteTime": 172800 },
}, //
"OAuth": { "JwtOptions": {
"QQ": { "Issuer": "NoahLan",
"ClientId": "", "Audience": "NoahLan",
"ClientSecret": "", "SecurityKey": "zqxwcevrbtnymu312412ihe9rfwhe78rh23djoi32hrui3ryf9e8wfh34iuj54y0934uti4h97fgw7hf97wyh8yy69520",
"RedirectUri": "" "ExpiresMinuteTime": 86400
}, },
"Gitee": { // Token
"ClientId": "", "RefreshJwtOptions": {
"ClientSecret": "", "Issuer": "NoahLan",
"RedirectUri": "" "Audience": "NoahLan",
} "SecurityKey": "67ij4o6jo4i5j6io45j6i4j74p5k6i54ojoi5t9g8ergoj34ofgkrtbmreog894jbioemgropihj48rj4io5juopjgior",
}, "ExpiresMinuteTime": 172800
"RbacOptions": { },
// //
"AdminPassword": "123456", "OAuth": {
// "QQ": {
"EnableCaptcha": true, "ClientId": "",
// "ClientSecret": "",
"EnableRegister": false, "RedirectUri": ""
// },
"EnableDataBaseBackup": false "Gitee": {
} "ClientId": "",
} "ClientSecret": "",
"RedirectUri": ""
}
},
// Rbac
"RbacOptions": {
//
"AdminPassword": "123456",
//
"EnableCaptcha": true,
//
"EnableRegister": false,
//
"EnableDataBaseBackup": false
}
}

Loading…
Cancel
Save