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.
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
USER app
WORKDIR /app
EXPOSE 8080
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
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/NPin.Framework.AspNetCore.csproj", "framework/NPin.Framework.AspNetCore/"]
COPY ["framework/NPin.Framework.Core/NPin.Framework.Core.csproj", "framework/NPin.Framework.Core/"]
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.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/rbac/NPin.Framework.Rbac.Application/NPin.Framework.Rbac.Application.csproj", "module/rbac/NPin.Framework.Rbac.Application/"]
COPY ["module/rbac/NPin.Framework.Rbac.Application.Contracts/NPin.Framework.Rbac.Application.Contracts.csproj", "module/rbac/NPin.Framework.Rbac.Application.Contracts/"]
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.SqlSugarCore.Abstractions/NPin.Framework.SqlSugarCore.Abstractions.csproj", "framework/NPin.Framework.SqlSugarCore.Abstractions/"]
COPY ["module/rbac/NPin.Framework.Rbac.Domain/NPin.Framework.Rbac.Domain.csproj", "module/rbac/NPin.Framework.Rbac.Domain/"]
COPY ["module/bbs/NPin.Framework.Bbs.Application.Contracts/NPin.Framework.Bbs.Application.Contracts.csproj", "module/bbs/NPin.Framework.Bbs.Application.Contracts/"]
COPY ["module/bbs/NPin.Framework.Bbs.Domain.Shared/NPin.Framework.Bbs.Domain.Shared.csproj", "module/bbs/NPin.Framework.Bbs.Domain.Shared/"]
COPY ["module/bbs/NPin.Framework.Bbs.Domain/NPin.Framework.Bbs.Domain.csproj", "module/bbs/NPin.Framework.Bbs.Domain/"]
COPY ["src/NPin.Application.Contracts/NPin.Application.Contracts.csproj", "src/NPin.Application.Contracts/"]
COPY ["src/NPin.Domain.Shared/NPin.Domain.Shared.csproj", "src/NPin.Domain.Shared/"]
COPY ["src/NPin.Domain/NPin.Domain.csproj", "src/NPin.Domain/"]
COPY ["src/NPin.SqlSugarCore/NPin.SqlSugarCore.csproj", "src/NPin.SqlSugarCore/"]
COPY ["framework/NPin.Framework.SqlSugarCore/NPin.Framework.SqlSugarCore.csproj", "framework/NPin.Framework.SqlSugarCore/"]
COPY ["module/bbs/NPin.Framework.Bbs.SqlSugarCore/NPin.Framework.Bbs.SqlSugarCore.csproj", "module/bbs/NPin.Framework.Bbs.SqlSugarCore/"]
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"
COPY . .
WORKDIR "/src/src/NPin.Web"
RUN dotnet build "./NPin.Web.csproj" -c $BUILD_CONFIGURATION -o /app/build
FROM build AS publish
ARG BUILD_CONFIGURATION=Release
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 .
#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
USER app
WORKDIR /app
EXPOSE 8080
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
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/NPin.Framework.AspNetCore.csproj", "framework/NPin.Framework.AspNetCore/"]
COPY ["framework/NPin.Framework.Core/NPin.Framework.Core.csproj", "framework/NPin.Framework.Core/"]
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.Contracts/NPin.Framework.Ddd.Application.Contracts.csproj", "framework/NPin.Framework.Ddd.Application.Contracts/"]
COPY ["module/upms/NPin.Framework.Upms.Application/NPin.Framework.Upms.Application.csproj", "module/upms/NPin.Framework.Upms.Application/"]
COPY ["module/upms/NPin.Framework.Upms.Application.Contracts/NPin.Framework.Upms.Application.Contracts.csproj", "module/upms/NPin.Framework.Upms.Application.Contracts/"]
COPY ["module/upms/NPin.Framework.Upms.Domain.Shared/NPin.Framework.Upms.Domain.Shared.csproj", "module/upms/NPin.Framework.Upms.Domain.Shared/"]
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 ["module/upms/NPin.Framework.Upms.Domain/NPin.Framework.Upms.Domain.csproj", "module/upms/NPin.Framework.Upms.Domain/"]
COPY ["src/NPin.Application.Contracts/NPin.Application.Contracts.csproj", "src/NPin.Application.Contracts/"]
COPY ["src/NPin.Domain.Shared/NPin.Domain.Shared.csproj", "src/NPin.Domain.Shared/"]
COPY ["src/NPin.Domain/NPin.Domain.csproj", "src/NPin.Domain/"]
COPY ["src/NPin.SqlSugarCore/NPin.SqlSugarCore.csproj", "src/NPin.SqlSugarCore/"]
COPY ["framework/NPin.Framework.SqlSugarCore/NPin.Framework.SqlSugarCore.csproj", "framework/NPin.Framework.SqlSugarCore/"]
COPY ["module/upms/NPin.Framework.Upms.SqlSugarCore/NPin.Framework.Upms.SqlSugarCore.csproj", "module/upms/NPin.Framework.Upms.SqlSugarCore/"]
RUN dotnet restore "./src/NPin.Web/./NPin.Web.csproj"
COPY . .
WORKDIR "/src/src/NPin.Web"
RUN dotnet build "./NPin.Web.csproj" -c $BUILD_CONFIGURATION -o /app/build
FROM build AS publish
ARG BUILD_CONFIGURATION=Release
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"]

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

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

Loading…
Cancel
Save