A small fortune generator web app. Click the button and the cluster hands you a little container wisdom.
It's a zero-dependency Node HTTP server that serves a single page. The page calls
GET /api/fortune and renders the result. A health endpoint lives at /healthz.
.
├── server.js # HTTP server: /, /healthz, /api/fortune, static files
├── fortunes.js # fortune data + selection logic
├── public/ # index.html, styles.css, app.js
├── Dockerfile # node:24-alpine, no runtime deps
├── k8s/ # Kubernetes manifests (namespace, deployment, service, ingress)
└── .github/workflows/ # build.yml — builds & pushes the image on tag push
node server.js # http://localhost:3000.github/workflows/build.yml builds portainer/fortunegen and pushes to Docker
Hub on every v* tag. A tag v1.0.0 produces portainer/fortunegen:v1.0.0.
Requires two repo secrets: DOCKERHUB_USERNAME and DOCKERHUB_TOKEN.
The manifests under k8s/ deploy the app into the fortunegen namespace behind
an nginx Ingress.