Skip to content

portainer/fortunegen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fortunegen

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.

Layout

.
├── 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

Run locally

node server.js            # http://localhost:3000

Container image & CI

.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.

Kubernetes

The manifests under k8s/ deploy the app into the fortunegen namespace behind an nginx Ingress.

About

A demo fortune generator app

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors