| name | health-check |
| description | Comprehensive health check that runs build, test, lint, builds docker containers, checks container health/status, and reports to the user. |
Comprehensive Health Check
Run a full end-to-end local health check on the project, including compiling the code, running tests, linting, building Docker images, and verifying container status and recent logs.
Instructions
Run the following checks sequentially:
-
Build the Code:
go build ./...
-
Test the Code:
go test ./...
-
Lint:
golangci-lint run
-
Build Docker Containers:
Build the images using the local docker-compose override:
docker compose -f docker/docker-compose.yml build
-
Start the Containers:
Start the services in the background:
docker compose -f docker/docker-compose.yml up -d
-
Check Container Health/Status:
Verify services are up and inspect recent logs:
sleep 5
docker compose -f docker/docker-compose.yml ps
docker compose -f docker/docker-compose.yml logs --tail=50
-
Clean up:
Bring the containers back down after the check is complete:
docker compose -f docker/docker-compose.yml down
-
Report to the User:
Consolidate the results of all the above steps. Clearly report whether each phase (Build, Test, Lint, Docker Build, Health Check) passed or failed, and provide the relevant error logs if any step failed.