Files
hiyv-nginx/README.md
T

2.2 KiB

Hiyv nginx

A small, Hiyv-branded nginx base image. The landing page displays the exact Git commit used to build the published container.

Run it

docker run --rm -p 8080:80 git.mancheff.com/hiyv-demo/hiyv-nginx:1.0.3

Open http://localhost:8080. The health endpoint is available at http://localhost:8080/healthz.

Publish a version

Publishing is driven by semantic-version Git tags:

git tag v1.0.0
git push origin main v1.0.0

The Gitea Actions workflow publishes the following tags for v1.2.3:

  • 1.2.3
  • 1.2
  • 1
  • the full Git commit SHA
  • latest

The workflow publishes linux/amd64 images to git.mancheff.com/hiyv-demo/hiyv-nginx.

The pinned upstream nginx base is mirrored at git.mancheff.com/hiyv-demo/nginx-base:1.28-alpine-amd64 so the self-hosted runner does not depend on Docker Hub connectivity during releases.

The repository must define two Actions secrets: REGISTRY_USERNAME with the Gitea username and REGISTRY_TOKEN with a personal access token that has package write access. Gitea's automatic job token cannot currently publish OCI packages.

Build locally

docker build --build-arg COMMIT_ID="$(git rev-parse HEAD)" -t hiyv-nginx:local .

Deploy with Argo CD

The Kubernetes manifests in k8s/ deploy two HIYV replicas and expose them through a cluster-internal Service. They use the public Gitea image directly; no imagePullSecrets are required.

The repository URL is deliberately not hard-coded. Set HIYV_GIT_REPO to the public Git repository that contains these manifests, make sure the Argo CD CLI is authenticated, and run:

export HIYV_GIT_REPO='<public Git repository URL>'
./scripts/create-argocd-application.sh

If HIYV_GIT_REPO is unset, the script explains what is missing and exits without changing Argo CD. When it is set, the script creates or updates the hiyv Application with automated sync, pruning, self-healing, and namespace creation enabled.

Optional configuration:

  • HIYV_GIT_REVISION (default: main)
  • HIYV_MANIFEST_PATH (default: k8s)
  • HIYV_ARGOCD_APP_NAME (default: hiyv)
  • HIYV_DESTINATION_SERVER (default: in-cluster Kubernetes API)
  • HIYV_DESTINATION_NAMESPACE (default: hiyv)