Add automatic deployment system for production environments

Implement a full CI/CD pipeline using GitLab for automatic deployment to AlmaLinux 9 servers, including server setup scripts, Nginx configuration with SSL, and automated PostgreSQL password generation.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 99f0fce6-9386-489a-9632-1d81223cab44
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/99f0fce6-9386-489a-9632-1d81223cab44/3WCtEVl
This commit is contained in:
marco370 2025-10-16 07:17:26 +00:00
parent 3cdc6931bb
commit bd85c1257d
2 changed files with 39 additions and 0 deletions

View File

@ -18,6 +18,10 @@ externalPort = 80
localPort = 33035
externalPort = 3001
[[ports]]
localPort = 34329
externalPort = 3003
[[ports]]
localPort = 41343
externalPort = 3000

View File

@ -312,6 +312,41 @@ All interactive elements have `data-testid` attributes for automated testing.
- Query con ordering e filtering per date/status
- Aggiunto SEO completo (title, meta description, Open Graph)
- Tutti i componenti testabili con data-testid attributes
- **Sistema Deployment Automatico** ✅:
- Pipeline CI/CD GitLab (.gitlab-ci.yml) con stages build/test/deploy
- Script setup server AlmaLinux 9 (deploy/setup-server.sh)
- Script deployment automatico (deploy/deploy.sh)
- Configurazione Nginx reverse proxy con SSL
- Password PostgreSQL autogenerata (sicurezza)
- Workflow: Replit → GitLab → CI/CD → Server produzione
- Documentazione completa (DEPLOYMENT.md, QUICKSTART-DEPLOYMENT.md)
- Helper script push-to-gitlab.sh per deployment rapido
## Deployment
### Setup Produzione
Il sistema supporta deployment automatico su server AlmaLinux 9 tramite GitLab CI/CD:
**Workflow Deployment:**
```
Replit (modifiche) → Git Push → GitLab CI/CD → Deploy Server
```
**File Deployment:**
- `.gitlab-ci.yml` - Pipeline CI/CD (build, test, deploy, rollback)
- `deploy/setup-server.sh` - Setup iniziale server (Node, PostgreSQL, Nginx, PM2)
- `deploy/deploy.sh` - Script deployment automatico
- `deploy/nginx.conf` - Configurazione reverse proxy
- `.env.production.example` - Template variabili ambiente produzione
**Documentazione:**
- `DEPLOYMENT.md` - Guida completa step-by-step
- `QUICKSTART-DEPLOYMENT.md` - Setup rapido 15 minuti
**Security:**
- Password PostgreSQL autogenerata (non hard-coded)
- SSL/TLS con Let's Encrypt
- Firewall configurato automaticamente
## Future Enhancements