修改配置

pull/15/head
刘鑫 4 months ago
parent 2c97e3ec15
commit 9ff5630cf5
  1. 24
      WeiCloud.Fusion/AlarmService/Alarm.DomainService/DahAlarm/DahuaGeneralCtlService.cs
  2. 13
      WeiCloud.Fusion/AlarmService/AlarmService.API/.config/dotnet-tools.json
  3. 32
      WeiCloud.Fusion/AspireApp/Manage.AppHost.AppHost/docker-compose.yml
  4. 43
      WeiCloud.Fusion/VideoService/Video.API/Properties/launchSettings.json

@ -17,8 +17,10 @@ namespace Alarm.DomainService.DahAlarm
private readonly MQTTClient _mqttClient; private readonly MQTTClient _mqttClient;
private readonly IMqttClientService _mqttClientService; private readonly IMqttClientService _mqttClientService;
private readonly ITokenProviderService _tokenProviderService; private readonly ITokenProviderService _tokenProviderService;
private readonly HttpClient _http;
// private readonly HttpClient _http;
private string mqttHostIp; private string mqttHostIp;
private int mqttHostPort; private int mqttHostPort;
private int mqttTimeout; private int mqttTimeout;
private string mqttUsername; private string mqttUsername;
@ -48,16 +50,16 @@ namespace Alarm.DomainService.DahAlarm
topicName = _configuration["SubscribeMQTT:TopicName"]!; topicName = _configuration["SubscribeMQTT:TopicName"]!;
_mqttClientService = mqttClientService; _mqttClientService = mqttClientService;
_tokenProviderService = tokenProviderService; _tokenProviderService = tokenProviderService;
_http = http; // _http = http;
} }
///// <summary> /// <summary>
///// 开发测试的时候,忽略证书 /// 开发测试的时候,忽略证书
///// </summary> /// </summary>
//private static readonly HttpClient _http = new(new HttpClientHandler private static readonly HttpClient _http = new(new HttpClientHandler
//{ {
// ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator, ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator,
//}); });
/// <summary> /// <summary>
/// 新增报警事件订阅 /// 新增报警事件订阅
@ -286,8 +288,8 @@ namespace Alarm.DomainService.DahAlarm
_logger.LogWarning("获取事件列表:token无效"); _logger.LogWarning("获取事件列表:token无效");
return new DaHApiResult<SubscriptionMapDto> { Success = false, Code = "1009", Msg = "token无效" }; return new DaHApiResult<SubscriptionMapDto> { Success = false, Code = "1009", Msg = "token无效" };
} }
// var url = $"https://{_configuration["DahuaAuth:Host"]}/evo-apigw/evo-brm/1.0.0/device/1000014"; var url = $"https://{_configuration["DahuaAuth:Host"]}/evo-apigw/evo-brm/1.0.0/device/1000021";
var url = $"https://{_configuration["DahuaAuth:Host"]}/evo-apigw/evo-event/1.0.0/subscribe/subscribe-list?monitorType=url&category={name}"; //var url = $"https://{_configuration["DahuaAuth:Host"]}/evo-apigw/evo-event/1.0.0/subscribe/subscribe-list?monitorType=url&category={name}";
try try
{ {

@ -0,0 +1,13 @@
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "9.0.8",
"commands": [
"dotnet-ef"
],
"rollForward": false
}
}
}

@ -0,0 +1,32 @@

version: "3.9"
services:
video-api:
image: lxxh1992/video-api:${VIDEO_TAG:-1.1}
container_name: video-api
restart: always
environment:
- ASPNETCORE_ENVIRONMENT=Production
healthcheck:
test: ["CMD", "curl", "-fsS", "http://localhost:8080/healthz"]
interval: 30s
timeout: 3s
retries: 3
# 仅绑定到本机回环,避免对公网暴露端口
ports:
- "127.0.0.1:5001:8080"
alarmservice-api:
image: lxxh1992/alarmservice-api:${ALARM_TAG:-1.1}
container_name: alarmservice-api
restart: always
environment:
- ASPNETCORE_ENVIRONMENT=Production
healthcheck:
test: ["CMD", "curl", "-fsS", "http://localhost:8080/healthz"]
interval: 30s
timeout: 3s
retries: 3
ports:
- "127.0.0.1:5002:8080"

@ -1,33 +1,24 @@
{ {
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:2357",
"sslPort": 44365
}
},
"profiles": { "profiles": {
"http": { "http": {
"commandName": "Project", "commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true, "launchBrowser": true,
"launchUrl": "swagger", "launchUrl": "swagger",
"applicationUrl": "http://localhost:5224",
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
} },
"dotnetRunMessages": true,
"applicationUrl": "http://localhost:5224"
}, },
"https": { "https": {
"commandName": "Project", "commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true, "launchBrowser": true,
"launchUrl": "swagger", "launchUrl": "swagger",
"applicationUrl": "https://localhost:7161;http://localhost:5224",
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
} },
"dotnetRunMessages": true,
"applicationUrl": "https://localhost:7161;http://localhost:5224"
}, },
"IIS Express": { "IIS Express": {
"commandName": "IISExpress", "commandName": "IISExpress",
@ -36,6 +27,26 @@
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
} }
},
"Container (Dockerfile)": {
"commandName": "Docker",
"launchBrowser": true,
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/swagger",
"environmentVariables": {
"ASPNETCORE_HTTPS_PORTS": "8081",
"ASPNETCORE_HTTP_PORTS": "8080"
},
"publishAllPorts": true,
"useSSL": true
}
},
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:2357",
"sslPort": 44365
} }
} }
} }
Loading…
Cancel
Save