# ⚑ Quick Start - GitLab Deployment Guida rapida per iniziare subito con il deployment su GitLab. --- ## πŸš€ Setup in 3 Passi ### 1️⃣ Ottieni Token GitLab ```bash # Vai su GitLab β†’ Settings β†’ Access Tokens # https://gitlab.com/-/profile/personal_access_tokens # # Crea token con permessi: api, read_repository, write_repository ``` ### 2️⃣ Configura git.env ```bash # Modifica git.env con le tue credenziali nano git.env ``` ```env GITLAB_USER=tuo-username GITLAB_TOKEN=glpat-xxxxxxxxxxxxxxxxxx GITLAB_REPO=https://gitlab.com/tuo-username/vigilanzaturni.git GITLAB_BRANCH=main ``` ### 3️⃣ Deploy! ```bash # Rendi eseguibile (solo prima volta) chmod +x push-gitlab.sh # Deploy! ./push-gitlab.sh ``` --- ## πŸ“ Comandi Principali ```bash # Bug fix, piccole modifiche (1.0.0 β†’ 1.0.1) ./push-gitlab.sh # Nuove funzionalitΓ  (1.0.5 β†’ 1.1.0) ./push-gitlab.sh minor # Breaking changes (1.1.5 β†’ 2.0.0) ./push-gitlab.sh major ``` --- ## βœ… Cosa Succede 1. βœ… **Backup Database** automatico (compressi .gz) 2. βœ… **Incrementa Versione** semantica 3. βœ… **Commit e Push** su GitLab 4. βœ… **Crea Tag** versione (es. v1.0.1) 5. βœ… **Aggiorna** version.json --- ## πŸ“Š Versioning Cheat Sheet | Tipo | Comando | Esempio | Quando | |------|---------|---------|--------| | **Patch** | `./push-gitlab.sh` | 1.0.0 β†’ 1.0.1 | Bug fix | | **Minor** | `./push-gitlab.sh minor` | 1.0.5 β†’ 1.1.0 | Nuove feature | | **Major** | `./push-gitlab.sh major` | 1.5.2 β†’ 2.0.0 | Breaking changes | --- ## πŸ” Verifica Stato ```bash # Versione corrente cat version.json # Ultimi backup ls -lh database-backups/ # Configurazione cat git.env ``` --- ## πŸ“– Documentazione Completa Per dettagli completi vedi: **[GITLAB-DEPLOY.md](GITLAB-DEPLOY.md)** --- **Setup time**: ~2 minuti πŸŽ‰