This commit is contained in:
ChenYi 2025-05-20 21:56:06 +08:00
commit 7a7a68b326
5 changed files with 7 additions and 18 deletions

View File

@ -1,7 +1,7 @@
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
EXPOSE 8080
EXPOSE 10500
ENV TZ=Asia/Shanghai
ENV ASPNETCORE_ENVIRONMENT=Production
@ -38,15 +38,7 @@ RUN mkdir -p /app/Plugins
# 复制发布内容
COPY --from=publish /app/publish .
# 健康检查
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \
CMD curl -f http://localhost:80/health || exit 1
# 设置入口点
ENTRYPOINT ["dotnet", "JiShe.CollectBus.Host.dll"]
# 启动命令
# 可选:添加命令行参数
# CMD ["--urls", "http://+:80"]

View File

@ -94,6 +94,6 @@ public class CollectBusApplicationModule : AbpModule
//默认初始化表计信息
var dbContext = context.ServiceProvider.GetRequiredService<EnergySystemScheduledMeterReadingService>();
await dbContext.InitAmmeterCacheData();
await dbContext.InitAmmeterCacheData("V4-Gather-8890");
}
}

View File

@ -257,7 +257,7 @@ namespace JiShe.CollectBus.ScheduledMeterReading
#if DEBUG
//// sql = $@"{sql} and c.Address in('542410000504','442405000040','442405000039','402410040506')";
sql = $@"{sql} and c.Address in('402410040506')";
//sql = $@"{sql} and c.Address in('402410040506')";
#endif
if (!string.IsNullOrWhiteSpace(gatherCode))

View File

@ -76,8 +76,8 @@ namespace JiShe.CollectBus.Host
app.UseCors(CollectBusHostConst.DefaultCorsPolicyName);
app.UseAuthentication();
app.UseAuthorization();
if (env.IsDevelopment())
{
//if (env.IsDevelopment())
//{
app.UseSwagger();
app.UseAbpSwaggerUI(options =>
{
@ -88,7 +88,7 @@ namespace JiShe.CollectBus.Host
options.DocExpansion(DocExpansion.None);
options.DefaultModelsExpandDepth(-1);
});
}
//}
app.UseAuditing();
app.UseAbpSerilogEnrichers();
app.UseUnitOfWork();

View File

@ -83,9 +83,6 @@
<None Update="Plugins\JiShe.CollectBus.Protocol.T6452007.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Plugins\JiShe.CollectBus.Protocol.Test.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>