gitrust template library
Welcome to the gitrust workshop. Each file here is standalone and copyable as is — one file, one use case. Internal comments are enough to adapt it. For educational explanations, refer to the manuals that point to these templates.
Convention : copiez le fichier qui correspond à votre cas, adaptez les valeurs marquées CHANGE_ME, puis supprimez les commentaires si vous le souhaitez. Ne modifiez pas les fichiers dans ce dépôt — travaillez toujours sur une copie locale.
Environment files (env/)
| Fichier |
Cas d'usage |
env/dev-local.env |
Instance de développement local sur localhost:4000 — PostgreSQL local, pas de TLS, debug activé |
env/production-mono-machine.env |
Production mono-machine derrière reverse-proxy — PostgreSQL, SMTP, Redis sessions, TLS délégué |
env/production-ci-heavy.env |
Production avec CI runners distants intensifs — tuning pool de connexions, rate limiting ajusté |
env/tests-e2e.env |
Environnement E2E Playwright — base éphémère, seed de données, SMTP mock |
env/ssh-guard-direct.env |
Bloc SSH_GUARD_* pour gitrust exposé Internet sans reverse-proxy SSH (profil direct) |
env/ssh-guard-nginx.env |
Bloc SSH_GUARD_* pour gitrust derrière nginx stream avec PROXY protocol v2 (profil nginx) |
Docker stacks (docker/)
Reverse-proxy (reverse-proxy/)
Systemd (systemd/)
CI configurations (.gitrust-ci.yml) (ci/)
| Fichier |
Cas d'usage |
ci/rust.gitrust-ci.yml |
Pipeline CI pour projet Rust — fmt, clippy, test, audit de dépendances, SBOM |
ci/go.gitrust-ci.yml |
Pipeline CI pour projet Go — vet, staticcheck, test, build multi-arch |
ci/python.gitrust-ci.yml |
Pipeline CI pour projet Python — ruff, mypy, pytest, packaging wheel |
ci/node.gitrust-ci.yml |
Pipeline CI pour projet Node.js — ESLint, Vitest, build, audit npm |
ci/dagger-power-mode/dagger.json |
Squelette Dagger Power Mode — module Go minimal à étendre pour pipelines complexes |
ci/dagger-power-mode/main.go |
Module Dagger Go — fonctions build/test/publish prêtes à adapter |
Sécurité (security/)
Backup and restore scripts (backup/)
| Fichier |
Cas d'usage |
backup/backup.sh |
Sauvegarde complète — pg_dump + rsync des dépôts bare + copie des clés SSH host |
backup/restore.sh |
Restauration complète depuis une archive de sauvegarde — avec vérification d'intégrité |
Example API clients (api-clients/)
These examples demonstrate Personal Access Token (PAT) authentication and basic CRUD operations on the gitrust v1 REST API.
Migration scripts (migration/)
How to use these templates from the manuals
Narrative manuals point to these files from their how-to sections. For example :
admin/how-to/configurer-smtp.md → « Copiez template/env/production-mono-machine.env puis... »
admin/tutorials/01-installation-docker.md → « La stack s'appuie sur template/docker/docker-compose.minimal.yml »
developer/how-to/implementer-endpoint-api.md → « Testez avec template/api-clients/curl-pat-auth.sh »
The templates do not contain an educational explanation — all the context is in the manuals.