Initial commit: Infrastructure Git CI/CD avec Gitea, Woodpecker, PostgreSQL, Consul et Registrator
This commit is contained in:
84
README.md
Normal file
84
README.md
Normal file
@ -0,0 +1,84 @@
|
||||
# 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
|
||||
|
||||
### 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
|
||||
|
||||
Reference in New Issue
Block a user