Skip to content

libert-xyz/alwayshealthy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minimal Health Check Container

What It Does

This container is a tiny HTTP health endpoint built with Go and based on the scratch image (0 dependencies, ~3–5 MB image size).

It listens on the port specified by the PORT environment variable and responds to root / requests with a JSON payload indicating health.

  • Listens on a configurable TCP port
  • Returns HTTP 200 OK with body: {"status":"healthy"}
  • Designed for minimal resource usage and fast startup

Usage

🐳 Quick Start: Use the Prebuilt Image from GitHub Container Registry

You can use the prebuilt multi-architecture image published to GitHub Container Registry (GHCR):

docker pull ghcr.io/libert-xyz/alwayshealthy:latest
docker run -e PORT=3000 -p 3000:3000 ghcr.io/libert-xyz/alwayshealthy

🛠️ Or Build Your Own Image

  1. Build the image locally
docker build -t alwayshealthy .
  1. Run the container
docker run -e PORT=3000 -p 3000:3000 alwayshealthy
  1. Test the endpoint
curl http://localhost:3000

Environment Variables

You can change the exposed port by modifying the PORT environment variable. For example, to run on port 8080:

docker run -e PORT=8080 -p 8080:8080 alwayshealthy

Use Cases

  • Kubernetes livenessProbe or readinessProbe
  • Docker Compose health checks
  • Lightweight health status for any containerized service

About

Minimal Health Check Container with a configurable port

Topics

Resources

License

Stars

Watchers

Forks

Packages