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/ pour la documentation complete :

Deploiement

Sur le serveur

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 :

cd /opt/infrastructure
git pull
# Redemarrer les services modifies
cd [service] && docker compose up -d

Licence

Prive - Infrastructure interne

Description
No description provided
Readme 77 KiB
Languages
Shell 100%