1
1
import {
2
+ Duration ,
2
3
aws_ec2 as EC2 ,
3
4
aws_ecr as ECR ,
4
5
aws_ecs as ECS ,
@@ -193,7 +194,7 @@ export class Integration extends Construct {
193
194
MOSQUITTO__BRIDGE01__BRIDGE_KEYFILE : `/mosquitto/security/nrfcloud_client.key` ,
194
195
MOSQUITTO__BRIDGE01__BRIDGE_INSECURE : `false` ,
195
196
MOSQUITTO__BRIDGE01__START_TYPE : `automatic` ,
196
- MOSQUITTO__BRIDGE01__KEEPALIVE_INTERVAL : `10 ` ,
197
+ MOSQUITTO__BRIDGE01__KEEPALIVE_INTERVAL : `30 ` ,
197
198
MOSQUITTO__BRIDGE01__NOTIFICATIONS : `true` ,
198
199
MOSQUITTO__BRIDGE01__NOTIFICATIONS_LOCAL_ONLY : `true` ,
199
200
MOSQUITTO__BRIDGE01__CLEANSESSION : `true` ,
@@ -211,9 +212,10 @@ export class Integration extends Construct {
211
212
MOSQUITTO__BRIDGE02__BRIDGE_CERTFILE : `/mosquitto/security/iot.crt` ,
212
213
MOSQUITTO__BRIDGE02__BRIDGE_KEYFILE : `/mosquitto/security/iot.key` ,
213
214
MOSQUITTO__BRIDGE02__BRIDGE_INSECURE : `false` ,
215
+ MOSQUITTO__BRIDGE02__BRIDGE_TRY_PRIVATE : `true` ,
214
216
MOSQUITTO__BRIDGE02__LOCAL_CLIENTID : `iot-bridge-local` ,
215
217
MOSQUITTO__BRIDGE02__START_TYPE : `automatic` ,
216
- MOSQUITTO__BRIDGE02__KEEPALIVE_INTERVAL : `10 ` ,
218
+ MOSQUITTO__BRIDGE02__KEEPALIVE_INTERVAL : `30 ` ,
217
219
MOSQUITTO__BRIDGE02__NOTIFICATIONS : `true` ,
218
220
MOSQUITTO__BRIDGE02__NOTIFICATIONS_LOCAL_ONLY : `true` ,
219
221
MOSQUITTO__BRIDGE02__CLEANSESSION : `true` ,
@@ -257,10 +259,11 @@ export class Integration extends Construct {
257
259
} ,
258
260
environment,
259
261
healthCheck : {
260
- command : [
261
- 'CMD-SHELL' ,
262
- 'mosquitto_sub -p 1883 -t topic -C 1 -E -i probe -W 3' ,
263
- ] ,
262
+ command : [ 'CMD-SHELL' , '/health.sh' ] ,
263
+ interval : Duration . minutes ( 1 ) ,
264
+ retries : 3 ,
265
+ startPeriod : Duration . minutes ( 3 ) ,
266
+ timeout : Duration . seconds ( 5 ) ,
264
267
} ,
265
268
} )
266
269
0 commit comments