4NK_template/docs/project/DEPLOYMENT.md

50 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Déploiement — 4NK_template (projet)
## Environnements
- Dev, staging, prod (à définir par projets consommateurs)
## Prérequis
- Outils de déploiement et conteneurisation selon projet
- Secrets fournis via CI (jamais en clair)
## Processus
- Préchecks: tests/doc/sécurité/version/changelog/tag
- Déploiement: pipeline CI dédié
- Validation: smoke checks, santé, métriques
## Bootstrap denvironnement local
- Script dinstallation: `scripts/deploy/setup.sh`
- Crée `~/.4nk_template/` (chmod 700) et `~/.4nk_template/.env` (chmod 600)
- Copie depuis `scripts/env/.env.template` si présent, sinon génère un modèle
- À compléter: `OPENAI_API_KEY`, `OPENAI_MODEL`, `RELEASE_TOKEN`, `GITEA_BASE_URL` (si custom)
- Applique la structure 4NK_template au projet cible (sans écraser par défaut):
- `.gitea/**`, `.cursor/**`, `.cursorignore`, `.gitignore`, `.markdownlint.json`
- `AGENTS.md`, `LICENSE`, `CONTRIBUTING.md`, `CODE_OF_CONDUCT.md`, `SECURITY.md`, `TEMPLATE_VERSION`
- `scripts/**` (dont `agents/`, `env/ensure_env.sh`, `deploy/setup.sh`), `security/` (si présent)
- `docs/templates/**` et génération `docs/INDEX.md`
Exécution:
```bash
# Provisionner l'environnement local (~/.4nk_template/.env) + cloner + appliquer le template
bash scripts/deploy/setup.sh <git_url_du_projet> [--dest DIR] [--force]
# Exemples
bash scripts/deploy/setup.sh https://git.example.com/org/mon-projet.git
bash scripts/deploy/setup.sh git@host:org/mon-projet.git --dest ~/work --force
```
## Rollback
- Version précédente prête, compatibilité des données
- Critères dactivation, procédure documentée
## Postdéploiement
- Vérification santé/logs/dashboards
- Suivi des erreurs et retours