181 lines
5.0 KiB
Markdown
181 lines
5.0 KiB
Markdown
# Start Here - NetGescon Day-0
|
|
|
|
Data aggiornamento: 11-03-2026
|
|
|
|
## Obiettivo di questo file
|
|
|
|
Permettere ripresa immediata del lavoro in `netgescon-day0` senza perdere contesto tra un workspace e l'altro.
|
|
|
|
## Stato confermato
|
|
|
|
- Repository Day-0 attivo: `/home/michele/netgescon/netgescon-day0`
|
|
- Remote Git attivo: `ssh://git@192.168.0.53:2222/michele/netgescon-day0.git`
|
|
- Branch principale: `main`
|
|
- Ultimo commit noto: `13813fe`
|
|
|
|
## Stato supporto/modifiche
|
|
|
|
- Errore `500` riprodotto e corretto in sessione.
|
|
- Causa: errore sintassi in `app/Providers/Filament/AdminFilamentPanelProvider.php`.
|
|
- Stato attuale endpoint: redirect login (`302`) se non autenticato.
|
|
|
|
## Verifica rapida in 30 secondi
|
|
|
|
```bash
|
|
cd /home/michele/netgescon/netgescon-day0
|
|
git status --short --branch
|
|
git log --oneline -n 5
|
|
php artisan list | head -n 30
|
|
php artisan list | grep -E "netgescon:update|distribution:manage" | head -n 20
|
|
```
|
|
|
|
## Sequenza comandi completa (agent + terminale)
|
|
|
|
### A. Preflight Day-0
|
|
|
|
```bash
|
|
cd /home/michele/netgescon/netgescon-day0
|
|
git pull --rebase origin main
|
|
git status --short --branch
|
|
bash scripts/ops/netgescon-day0-legacy-sync.sh
|
|
```
|
|
|
|
### B. Dipendenze locali (se necessario)
|
|
|
|
```bash
|
|
cd /home/michele/netgescon/netgescon-day0
|
|
composer install
|
|
npm install
|
|
```
|
|
|
|
### C. Riavvio server sviluppo (Day-0)
|
|
|
|
```bash
|
|
# stop eventuali server precedenti su :8000
|
|
pkill -f "php artisan serve --host=0.0.0.0 --port=8000" || true
|
|
|
|
cd /home/michele/netgescon/netgescon-day0
|
|
mkdir -p storage/logs
|
|
nohup php artisan serve --host=0.0.0.0 --port=8000 --no-reload > storage/logs/dev-server.log 2>&1 &
|
|
sleep 2
|
|
curl -I -sS http://127.0.0.1:8000/up | head -n 1
|
|
```
|
|
|
|
### D. Check pagina Filament modifiche
|
|
|
|
```bash
|
|
curl -I -sS http://127.0.0.1:8000/admin-filament/supporto/modifiche | head -n 1
|
|
```
|
|
|
|
### E. Aggiornare changelog visibile in Filament
|
|
|
|
```bash
|
|
cd /home/michele/netgescon/netgescon-day0
|
|
bash scripts/ops/netgescon-add-modifica.sh \
|
|
--area "Filament / Supporto" \
|
|
--desc "<descrizione modifica/fix>" \
|
|
--type U
|
|
```
|
|
|
|
Nota:
|
|
|
|
- Questa azione aggiorna `docs/NETGESCON-MODIFICHE.md`, letto da `/admin-filament/supporto/modifiche`.
|
|
|
|
### F. Backup continuita chat/sessione AI
|
|
|
|
```bash
|
|
cd /home/michele/netgescon/netgescon-day0
|
|
bash scripts/ai/handoff_checkpoint.sh
|
|
bash scripts/ai/topic_checkpoint.sh "NetGescon Day-0" "Checkpoint operativo"
|
|
bash scripts/ai/save_periodic_summary.sh "NetGescon Day-0" both
|
|
bash scripts/ai/archive_heavy_chats.sh --threshold=150 --dry-run
|
|
bash scripts/ai/archive_heavy_chats.sh --threshold=150 --apply
|
|
bash scripts/ai/continuity_auto.sh --threshold=150 --topic="NetGescon Day-0" --note="Ripartenza sviluppo"
|
|
```
|
|
|
|
### G. Ciclo sviluppo -> Git
|
|
|
|
```bash
|
|
cd /home/michele/netgescon/netgescon-day0
|
|
git add -A
|
|
git commit -m "feat: <descrizione>"
|
|
git push origin main
|
|
```
|
|
|
|
### H. Ciclo update staging
|
|
|
|
```bash
|
|
cd /var/www/netgescon
|
|
php artisan optimize:clear
|
|
php artisan config:clear
|
|
php artisan route:clear
|
|
php artisan netgescon:update --channel=free
|
|
php artisan netgescon:update --channel=free --apply
|
|
curl -I -sS "https://staging.netgescon.it/up" | head -n 1
|
|
curl -I -sS "https://staging.netgescon.it/fornitore/tickets?fornitore=1" | head -n 1
|
|
```
|
|
|
|
## Documenti da leggere in ordine (ripartenza agent)
|
|
|
|
1. `docs/ai/restart/START-HERE-NETGESCON-DAY0.md` (questo file)
|
|
2. `docs/ai/restart/AGENT-OPERATIVO-COMANDI-DAY0.md`
|
|
3. `docs/ai/restart/HANDOFF_AGENT_OPERATIVO_20260311.md`
|
|
4. `docs/ai/restart/CONTINUITA-STORICO-DAY0.md`
|
|
5. `docs/ai/restart/FILAMENT-ONLY-CUTOVER-CHECKLIST.md`
|
|
6. `docs/RUNBOOK-DISTRIBUZIONE-REMOTA-NETGESCON.md`
|
|
7. `docs/distribuzione-update-netgescon.md`
|
|
8. `Miki-Bug-workspace/AGENT_GIT.MD`
|
|
|
|
## Modifiche chiave gia presenti nel Day-0
|
|
|
|
- `config/distribution.php`
|
|
- `app/Console/Commands/NetgesconDistributionPullCommand.php`
|
|
- `app/Http/Controllers/Api/DistributionController.php`
|
|
- `routes/api.php`
|
|
- `bootstrap/app.php`
|
|
- `scripts/ops/netgescon-baseline-freeze.sh`
|
|
- `scripts/ops/netgescon-publish-manifest.sh`
|
|
- fix provider Filament in `app/Providers/Filament/AdminFilamentPanelProvider.php`
|
|
|
|
## Flusso operativo da ora
|
|
|
|
1. Sviluppo e commit solo in `netgescon-day0`.
|
|
2. Push su `origin/main` (Gitea Day-0).
|
|
3. Build package update e publish manifest.
|
|
4. Apply su staging con `php artisan netgescon:update --channel=free --apply`.
|
|
5. Smoke test rete e funzionali minimi.
|
|
|
|
## Comandi base sviluppo + staging
|
|
|
|
```bash
|
|
# sviluppo
|
|
cd /home/michele/netgescon/netgescon-day0
|
|
git pull --rebase origin main
|
|
|
|
# dopo modifiche
|
|
git add -A
|
|
git commit -m "feat: <descrizione>"
|
|
git push origin main
|
|
|
|
# staging
|
|
cd /var/www/netgescon
|
|
php artisan netgescon:update --channel=free
|
|
php artisan netgescon:update --channel=free --apply
|
|
```
|
|
|
|
## Nota sicurezza operativa
|
|
|
|
- Mantieni `22` chiuso all'esterno e usa VPN/LAN per amministrazione.
|
|
- Mantieni `2222` solo per Git/SSH key-based.
|
|
- Attiva `fail2ban` su SSH e login web.
|
|
- Abilita 2FA su Gitea per account admin/dev.
|
|
|
|
## Prossimo step consigliato
|
|
|
|
Eseguire un ciclo completo con una modifica piccola reale:
|
|
|
|
1. commit su Day-0,
|
|
2. publish package,
|
|
3. apply staging,
|
|
4. checklist smoke test finale.
|