commit d13597e6b2e8b56908b3e010edb71353dff09595 Author: capitano Date: Wed Mar 18 21:52:09 2026 +0100 first commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..7e311c7 --- /dev/null +++ b/README.md @@ -0,0 +1,66 @@ +# Linux App Store - Kubernetes Deployment + +## Deploy + +### Prerequisiti + +- Cluster Kubernetes attivo +- kubectl configurato +- Container registry accessibile (Docker Hub o privato) + +### Build e Deploy + +```bash +# Build l'immagine +docker build -t linux-app-store:latest . + +# Tagga per il push +docker tag linux-app-store:latest /linux-app-store:latest + +# Push su registry +docker push /linux-app-store:latest + +# Deploy su Kubernetes +kubectl apply -f k8s/deployment.yaml +kubectl apply -f k8s/service.yaml +kubectl apply -f k8s/ingress.yaml + +# Verifica +kubectl get pods +kubectl get svc +kubectl get ingress + +# Log +kubectl logs -l app=linux-app-store -f +``` + +### File struttura + +``` +infrastructure/ +├── Dockerfile # Dockerfile multi-stage (Nginx) +├── Dockerfile.simple # Dockerfile semplificato +├── nginx.conf # Configurazione Nginx +├── frontend/ +│ ├── index.html # Pagina principale +│ ├── script.js # Logica dell'app +│ └── apps.json # Database applicazioni +└── k8s/ + ├── deployment.yaml # Kubernetes Deployment (2.repliche) + ├── service.yaml # Service (ClusterIP) + └── ingress.yaml # Ingress (dominio apps.local) +``` + +### Customizzazione + +1. Modificare `frontend/apps.json` per aggiungere rimuovere applicazioni +2. Aggiornare `nginx.conf` per personalizzare le regole di routing +3. Modificare `k8s/deployment.yaml` per aggiornare le risorse o le immagini + +### Rimozione + +```bash +kubectl delete -f k8s/ingress.yaml +kubectl delete -f k8s/service.yaml +kubectl delete -f k8s/deployment.yaml +```