VigilanzaTurni/QUICKSTART-GITLAB.md
marco370 70967cfcb3 Improve GitLab deployment process and version management
Add documentation for a new script that automates database backups, version incrementing, and Gitlab pushes, including a .env file for credentials and commands for patch, minor, and major version updates.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 42d8028a-fa71-4ec2-938c-e43eedf7df01
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/42d8028a-fa71-4ec2-938c-e43eedf7df01/Z1LDqzu
2025-10-17 06:39:43 +00:00

101 lines
1.8 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ⚡ 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 🎉