A learning GitOps demo: Next.js frontend, NestJS backend, Postgres, Kubernetes manifests, and Argo CD.
| Path | What |
|---|---|
frontend/ |
Next.js app + Dockerfile |
backend/ |
NestJS API + Dockerfile |
infra/k8s/ |
Kubernetes manifests (Minikube-friendly local images) |
infra/argocd/ |
Argo CD Application (watches infra/k8s) |
.github/workflows/ |
Build and push images to Docker Hub |
docs/minikube.md |
Start here on Mac — Minikube + Argo CD guide |
docs/home-server.md |
Later: Ubuntu home server with k3s |
Docker Desktop and Minikube should already be installed.
cd gitops-project
docker compose up --build- Frontend: http://localhost:3000
- Backend: http://localhost:3001/message
minikube start --driver=docker --cpus=4 --memory=6144
docker build -t gitops-backend:local ./backend
docker build -t gitops-frontend:local ./frontend
minikube image load gitops-backend:local
minikube image load gitops-frontend:local
kubectl apply -f infra/k8s/
kubectl port-forward -n gitops svc/gitops-frontend 30080:3000Full details: docs/minikube.md.
- Push this repo to GitHub.
- Set
repoURLininfra/argocd/gitops-app.yaml. - Install Argo CD and apply the Application (steps in docs/minikube.md).
For Docker Hub + GitHub Actions, see docs/dockerhub-images.md.
infra/k8s uses:
gitops-backend:local/gitops-frontend:localimagePullPolicy: Neverreplicas: 1
That keeps Phase 2 working without a registry. Switch to Docker Hub images when you move to the full GitOps loop.
- Frontend NodePort is
30080(use port-forward on Mac Docker driver). - Backend talks to
gitops-postgresinside the cluster. - Home-server / Tailscale / k3s is optional and documented separately — learn Minikube GitOps first.