diff --git a/deploy/ecs_task.tf b/deploy/ecs_task.tf index 67877ad..b369246 100644 --- a/deploy/ecs_task.tf +++ b/deploy/ecs_task.tf @@ -35,6 +35,13 @@ resource "aws_ecs_task_definition" "web_app" { awslogs-stream-prefix = "ecs" } } + healthCheck = { + command = ["CMD-SHELL", "curl -f http://localhost:8080 || exit 1"] + interval = 30 + retries = 3 + timeout = 5 + startPeriod = 10 + } } ]) }