Skip to content

Add healthcheck script for ECS container health checks#1844

Closed
whi-tw wants to merge 1 commit intomainfrom
whi-tw/add-container-healthcheck
Closed

Add healthcheck script for ECS container health checks#1844
whi-tw wants to merge 1 commit intomainfrom
whi-tw/add-container-healthcheck

Conversation

@whi-tw
Copy link
Copy Markdown
Contributor

@whi-tw whi-tw commented Jan 19, 2026

What problem does this pull request solve?

Trello card:

Now we sometimes have a sidecar running in the task (AWS ADOT), the ecs task health status is determined by the state of the sidecar, not the state of the main container.

This healthcheck script allows us to configure the healthcheck on the app task to explicitly determine whether the app container is healthy, too.

example config:

  "healthCheck": {
    "command": ["CMD", "/app/bin/healthcheck"],
    "interval": 0,
    "timeout": 5,
    "retries": 3,
    "startPeriod": 60
  }

Things to consider when reviewing

  • Ensure that you consider the wider context.
  • Does it work when run on your machine?
  • Is it clear what the code is doing?
  • Do the commit messages explain why the changes were made?
  • Are there all the unit tests needed?
  • Do the end to end tests need updating before these changes will pass?
  • Has all relevant documentation been updated?

@whi-tw whi-tw force-pushed the whi-tw/add-container-healthcheck branch from 3802b6f to 5e6c19e Compare January 19, 2026 12:20
@github-actions
Copy link
Copy Markdown
Contributor

🎉 A review copy of this PR has been deployed! It is made of up two components

  1. A review copy of forms-runner
  2. A production copy of forms-admin

Important

Not all of the functionality of forms-runner is present in review apps.
Functionality such as sending emails, file upload, and S3 submission types are
deliberately disabled for the sake of simplifying review apps.

You should use the full dev environment to test the functionality which is disabled here.

It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready
after 5 minutes, there may be something wrong with the ECS task. You will need to go to the integration AWS account
to debug, or otherwise ask an infrastructure person.

For the sign in details and more information, see the review apps wiki page.

@whi-tw whi-tw force-pushed the whi-tw/add-container-healthcheck branch 2 times, most recently from c35a277 to 7a5d683 Compare January 19, 2026 12:33
This calls the Rails /up endpoint to verify the application is running.

Also, use this new healthcheck script in the review app task definition
@whi-tw whi-tw force-pushed the whi-tw/add-container-healthcheck branch from 7a5d683 to f7ac6b1 Compare January 19, 2026 12:38
@sonarqubecloud
Copy link
Copy Markdown

@whi-tw whi-tw closed this Jan 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant