Merge branch 'dev' of https://310.jisheyun.com/daizan/JiShe.CollectBus into dev
This commit is contained in:
commit
7a7a68b326
12
Dockerfile
12
Dockerfile
@ -1,7 +1,7 @@
|
|||||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
|
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
EXPOSE 80
|
EXPOSE 8080
|
||||||
EXPOSE 443
|
EXPOSE 10500
|
||||||
ENV TZ=Asia/Shanghai
|
ENV TZ=Asia/Shanghai
|
||||||
ENV ASPNETCORE_ENVIRONMENT=Production
|
ENV ASPNETCORE_ENVIRONMENT=Production
|
||||||
|
|
||||||
@ -38,15 +38,7 @@ RUN mkdir -p /app/Plugins
|
|||||||
# 复制发布内容
|
# 复制发布内容
|
||||||
COPY --from=publish /app/publish .
|
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"]
|
ENTRYPOINT ["dotnet", "JiShe.CollectBus.Host.dll"]
|
||||||
|
|
||||||
# 启动命令
|
|
||||||
# 可选:添加命令行参数
|
|
||||||
# CMD ["--urls", "http://+:80"]
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -94,6 +94,6 @@ public class CollectBusApplicationModule : AbpModule
|
|||||||
|
|
||||||
//默认初始化表计信息
|
//默认初始化表计信息
|
||||||
var dbContext = context.ServiceProvider.GetRequiredService<EnergySystemScheduledMeterReadingService>();
|
var dbContext = context.ServiceProvider.GetRequiredService<EnergySystemScheduledMeterReadingService>();
|
||||||
await dbContext.InitAmmeterCacheData();
|
await dbContext.InitAmmeterCacheData("V4-Gather-8890");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -257,7 +257,7 @@ namespace JiShe.CollectBus.ScheduledMeterReading
|
|||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
//// sql = $@"{sql} and c.Address in('542410000504','442405000040','442405000039','402410040506')";
|
//// 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
|
#endif
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(gatherCode))
|
if (!string.IsNullOrWhiteSpace(gatherCode))
|
||||||
|
|||||||
@ -76,8 +76,8 @@ namespace JiShe.CollectBus.Host
|
|||||||
app.UseCors(CollectBusHostConst.DefaultCorsPolicyName);
|
app.UseCors(CollectBusHostConst.DefaultCorsPolicyName);
|
||||||
app.UseAuthentication();
|
app.UseAuthentication();
|
||||||
app.UseAuthorization();
|
app.UseAuthorization();
|
||||||
if (env.IsDevelopment())
|
//if (env.IsDevelopment())
|
||||||
{
|
//{
|
||||||
app.UseSwagger();
|
app.UseSwagger();
|
||||||
app.UseAbpSwaggerUI(options =>
|
app.UseAbpSwaggerUI(options =>
|
||||||
{
|
{
|
||||||
@ -88,7 +88,7 @@ namespace JiShe.CollectBus.Host
|
|||||||
options.DocExpansion(DocExpansion.None);
|
options.DocExpansion(DocExpansion.None);
|
||||||
options.DefaultModelsExpandDepth(-1);
|
options.DefaultModelsExpandDepth(-1);
|
||||||
});
|
});
|
||||||
}
|
//}
|
||||||
app.UseAuditing();
|
app.UseAuditing();
|
||||||
app.UseAbpSerilogEnrichers();
|
app.UseAbpSerilogEnrichers();
|
||||||
app.UseUnitOfWork();
|
app.UseUnitOfWork();
|
||||||
|
|||||||
@ -83,9 +83,6 @@
|
|||||||
<None Update="Plugins\JiShe.CollectBus.Protocol.T6452007.dll">
|
<None Update="Plugins\JiShe.CollectBus.Protocol.T6452007.dll">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
<None Update="Plugins\JiShe.CollectBus.Protocol.Test.dll">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user