Skip to content

Commit 57b3f47

Browse files
Merge pull request #3686 from nhsuk/include_db_in_task_healthcheck
Include DB check in healthcheck
2 parents 5cc7f48 + 4fcfee1 commit 57b3f47

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

terraform/app/ecs.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ module "web_service" {
3131
task_role_arn = aws_iam_role.ecs_task_role.arn
3232
log_group_name = aws_cloudwatch_log_group.ecs_log_group.name
3333
region = var.region
34-
health_check_command = ["CMD-SHELL", "curl -f http://localhost:4000/up || exit 1"]
34+
health_check_command = ["CMD-SHELL", "curl -f http://localhost:4000/health/database || exit 1"]
3535
}
3636
network_params = {
3737
subnets = [aws_subnet.private_subnet_a.id, aws_subnet.private_subnet_b.id]
@@ -70,7 +70,7 @@ module "good_job_service" {
7070
task_role_arn = aws_iam_role.ecs_task_role.arn
7171
log_group_name = aws_cloudwatch_log_group.ecs_log_group.name
7272
region = var.region
73-
health_check_command = ["CMD-SHELL", "curl -f http://localhost:4000 || exit 1"]
73+
health_check_command = ["CMD-SHELL", "curl -f http://localhost:4000/status/connected || exit 1"]
7474
}
7575
network_params = {
7676
subnets = [aws_subnet.private_subnet_a.id, aws_subnet.private_subnet_b.id]

0 commit comments

Comments
 (0)