Files
infrastructure/README.md
syoul 9132aeb5d1 feat: ajout documentation Nginx Proxy Manager et scripts de déploiement
- Documentation complète pour Nginx Proxy Manager (docs/10-configuration-nginx-proxy-manager.md)
- Script get-npm-token.sh pour générer automatiquement les tokens API
- Exemple complet de .woodpecker.yml avec logique inline de déploiement
- Documentation déploiement applications avec URLs dynamiques (docs/09-deploiement-applications.md)
- Script deploy.sh comme alternative optionnelle
- Mise à jour README avec références aux nouvelles documentations
2025-12-24 18:14:48 +01:00

87 lines
2.4 KiB
Markdown

# Infrastructure Git CI/CD
Configuration Docker Compose pour une infrastructure complete de gestion de code source et d'integration continue.
## Composants
- **Gitea** : Serveur Git auto-heberge
- **Woodpecker CI** : Plateforme CI/CD
- **PostgreSQL** : Base de donnees pour Gitea
- **Consul** : Service discovery (optionnel)
- **Registrator** : Auto-registration Docker (optionnel)
## Structure
```
.
├── consul/ # Configuration Consul
├── docs/ # Documentation complete
├── gitea/ # Configuration Gitea
├── postgres/ # Configuration PostgreSQL
├── registrator/ # Configuration Registrator
└── woodpecker/ # Configuration Woodpecker CI
```
## Documentation
Voir le dossier [docs/](docs/) pour la documentation complete :
- [Architecture](docs/01-architecture.md)
- [Installation](docs/02-installation.md)
- [Configuration Gitea](docs/03-configuration-gitea.md)
- [Configuration Woodpecker](docs/04-configuration-woodpecker.md)
- [Configuration PostgreSQL](docs/05-configuration-postgresql.md)
- [Configuration Consul](docs/06-configuration-consul.md)
- [Configuration Registrator](docs/07-configuration-registrator.md)
- [Deploiement Consul/Registrator](docs/08-deploiement-consul-registrator.md)
- [Deploiement Applications](docs/09-deploiement-applications.md)
- [Nginx Proxy Manager](docs/10-configuration-nginx-proxy-manager.md)
## Deploiement
### Sur le serveur
```bash
cd /opt
git clone git@git.syoul.fr:syoul/infrastructure.git
cd infrastructure
# Creer les fichiers .env necessaires
cp consul/env.template consul/.env
cp registrator/env.template registrator/.env
# Editer ces fichiers avec les vrais tokens
# Deployer les services
cd consul && docker compose up -d
cd ../registrator && docker compose up -d
cd ../postgres && docker compose up -d
cd ../gitea && docker compose up -d
cd ../woodpecker && docker compose up -d
```
## Fichiers secrets
Les fichiers suivants ne sont **PAS versionnes** et doivent etre crees sur le serveur :
- `consul/.env` : Token administrateur Consul
- `registrator/.env` : Token Registrator
- `gitea/gitea.env` : Configuration Gitea avec mots de passe
Utilisez les fichiers `*.template` comme reference.
## Maintenance
Pour mettre a jour l'infrastructure :
```bash
cd /opt/infrastructure
git pull
# Redemarrer les services modifies
cd [service] && docker compose up -d
```
## Licence
Prive - Infrastructure interne