From c91817c9eac9aed7a2dd9c573213345ad4f48cc7 Mon Sep 17 00:00:00 2001 From: Pedro Mastelaro Date: Wed, 11 Mar 2026 13:51:09 -0300 Subject: [PATCH 1/2] Update docker-delegate-to-ecs-fargate.md --- .../docker-delegate-to-ecs-fargate.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/platform/delegates/install-delegates/docker-delegate-to-ecs-fargate.md b/docs/platform/delegates/install-delegates/docker-delegate-to-ecs-fargate.md index c4e68f5357f..45c5a4b23b0 100644 --- a/docs/platform/delegates/install-delegates/docker-delegate-to-ecs-fargate.md +++ b/docs/platform/delegates/install-delegates/docker-delegate-to-ecs-fargate.md @@ -193,6 +193,23 @@ Use the following steps to create a task definition. For information about task } ``` +#### Optional: Add an ECS health check to auto-restart the delegate task + +Harness does not currently manage ECS task health checks. To improve resiliency after network disruptions or outages, you can configure an ECS `healthCheck` on the delegate container so ECS can automatically restart the task if the delegate becomes unhealthy. +Example: +```json +"healthCheck": { + "command": ["CMD-SHELL", "curl -f http://localhost:3460/api/health || exit 1"], + "interval": 30, + "timeout": 5, + "retries": 3, + "startPeriod": 60 +} +``` +Notes: +- The delegate exposes a health endpoint on http://localhost:3460/api/health inside the container. +- Tune startPeriod if your delegate container takes longer to initialize in your environment. + 2. Edit the fields of the task definition as follows. | **Field** | **Description** | From 2f7aefc3e3240387440af661065da34f8238ebee Mon Sep 17 00:00:00 2001 From: Pedro Mastelaro Date: Wed, 11 Mar 2026 15:23:59 -0300 Subject: [PATCH 2/2] Update docker-delegate-to-ecs-fargate.md --- .../docker-delegate-to-ecs-fargate.md | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/docs/platform/delegates/install-delegates/docker-delegate-to-ecs-fargate.md b/docs/platform/delegates/install-delegates/docker-delegate-to-ecs-fargate.md index 45c5a4b23b0..e0c5fb0224a 100644 --- a/docs/platform/delegates/install-delegates/docker-delegate-to-ecs-fargate.md +++ b/docs/platform/delegates/install-delegates/docker-delegate-to-ecs-fargate.md @@ -193,23 +193,6 @@ Use the following steps to create a task definition. For information about task } ``` -#### Optional: Add an ECS health check to auto-restart the delegate task - -Harness does not currently manage ECS task health checks. To improve resiliency after network disruptions or outages, you can configure an ECS `healthCheck` on the delegate container so ECS can automatically restart the task if the delegate becomes unhealthy. -Example: -```json -"healthCheck": { - "command": ["CMD-SHELL", "curl -f http://localhost:3460/api/health || exit 1"], - "interval": 30, - "timeout": 5, - "retries": 3, - "startPeriod": 60 -} -``` -Notes: -- The delegate exposes a health endpoint on http://localhost:3460/api/health inside the container. -- Tune startPeriod if your delegate container takes longer to initialize in your environment. - 2. Edit the fields of the task definition as follows. | **Field** | **Description** | @@ -264,6 +247,23 @@ Notes: aws ecs create-service --cli-input-json file://service.json ``` +## Optional: Add an ECS health check to auto-restart the delegate task + +Harness does not currently manage ECS task health checks. To improve resiliency after network disruptions or outages, you can configure an ECS `healthCheck` on the delegate container so ECS can automatically restart the task if the delegate becomes unhealthy. +Example: +```json +"healthCheck": { + "command": ["CMD-SHELL", "curl -f http://localhost:3460/api/health || exit 1"], + "interval": 30, + "timeout": 5, + "retries": 3, + "startPeriod": 60 +} +``` +Notes: +- The delegate exposes a health endpoint on http://localhost:3460/api/health inside the container. +- Tune startPeriod if your delegate container takes longer to initialize in your environment. + ## Deploy a delegate using Terraform The above steps to [deploy a delegate to ECS](#deploy-a-delegate-to-amazon-ecs) are also available in a Terraform module that you can reference directly or use as a starting point for your own automation. You can use an existing ECS cluster (EC2- or Fargate-based) or let the module create one for you.