Poyraz Cnpg Gui - Postgresql Management UI
Lightweight, modern web UI for managing PostgreSQL clusters with a Spring Boot backend and Flyway migrations. Ready for local development and production Kubernetes deployments.
Key features
- Modern React + Vite frontend
- Spring Boot backend with Flyway migrations
- Docker Compose quickstart for local development
- Kubernetes manifests in
deploy/for production
Contents
- Project overview
- Image build & push
- Kubernetes deployment
- Configuration
- Troubleshooting
- Screenshots
- Contributing
This repository contains a web-based administration UI and a Spring Boot backend for PostgreSQL management: tenants, users, backups/restores, audit logs and more. Database migrations are tracked under src/main/resources/db/migration via Flyway.
Access:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8080
Note: Flyway migrations run automatically on backend startup.
git clone https://github.com/capta1nBee/cnpg-gui.git
cd deploy
kubectl create namespace poyraz-system
kubectl apply -f configmap.yaml
kubectl apply -f postgresql.yaml
kubectl apply -f backend.yaml
kubectl apply -f frontend.yamlBuild and push backend image:
cd backend
docker build -t <registry>/cnpg-gui-backend:latest -f Dockerfile .
docker push <registry>/cnpg-gui-backend:latestBuild and push frontend image:
cd frontend
docker build -t <registry>/cnpg-gui-frontend:latest -f Dockerfile .
docker push <registry>/cnpg-gui-frontend:latestUse semantic tags for releases (for example v1.2.3) and optionally update latest.
Manifest files are provided in deploy/: backend.yaml, frontend.yaml, postgresql.yaml.
Example deployment steps:
# namespace (optional)
kubectl create namespace poyraz-system || true
# create secrets/config and apply backend + frontend
kubectl apply -n poyraz-system -f deploy/configmap.yaml
`Change CORS_ALLOWED_ORIGINS --> cnpg.poyraz.com`
# apply Postgres
kubectl apply -n poyraz-system -f deploy/postgresql.yaml
# apply Frontend and Backend
kubectl apply -n poyraz-system -f deploy/backend.yaml
kubectl apply -n poyraz-system -f deploy/frontend.yamlAdjust Ingress/LoadBalancer configuration in deploy/*.yaml for your environment and TLS settings.
To perform a rolling update after pushing a new image:
kubectl -n poyraz-system set image deploy/cnpg-gui-backend cnpg-gui-backend=<registry>/cnpg-gui-backend:v1.2.3
kubectl -n poyraz-system rollout status deploy/cnpg-gui-backendImportant variables:
DB_URL,DB_USER,DB_PASSWORDJWT_SECRET,JWT_EXPIRY_MSSUPERADMIN_USER,SUPERADMIN_PASSWORDCORS_ALLOWED_ORIGINS
- View backend logs:
kubectl -n poyraz-system logs deploy/cnpg-gui-backend - ImagePullBackOff:
kubectl -n poyraz-system describe pod <pod>and check image pull secrets - Migration issues: verify DB permissions and Flyway migration scripts under
src/main/resources/db/migration
Overview of the UI (screenshots taken from images/):
- Fork and open a pull request.
- Coding standards: Java 17 for backend, Node.js 18+ for frontend.







