Initial : README et .gitignore de l'espace de travail Alpinux
Dépôt racine documentant la structure multi-projets org.alpinux.owni. Chaque sous-dossier est un dépôt git indépendant (Option A). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
commit
c70b010a4b
2 changed files with 185 additions and 0 deletions
45
.gitignore
vendored
Normal file
45
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
# ── Dépôts git indépendants (Option A) ───────────────────────────────
|
||||||
|
# Chaque sous-dossier est son propre dépôt — git ne suit pas leur contenu.
|
||||||
|
# Listés explicitement pour éviter tout ajout accidentel à la racine.
|
||||||
|
admin/
|
||||||
|
dynamic/
|
||||||
|
feedback/
|
||||||
|
home/
|
||||||
|
infra/
|
||||||
|
portail/
|
||||||
|
static/
|
||||||
|
wiki/
|
||||||
|
|
||||||
|
# ── Python ────────────────────────────────────────────────────────────
|
||||||
|
venv/
|
||||||
|
.venv/
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
|
*.pyo
|
||||||
|
*.egg-info/
|
||||||
|
dist/
|
||||||
|
build/
|
||||||
|
|
||||||
|
# ── Environnement local ───────────────────────────────────────────────
|
||||||
|
.env
|
||||||
|
*.env.local
|
||||||
|
|
||||||
|
# ── MkDocs ────────────────────────────────────────────────────────────
|
||||||
|
site/
|
||||||
|
|
||||||
|
# ── Node / JS ─────────────────────────────────────────────────────────
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
# ── Éditeurs ─────────────────────────────────────────────────────────
|
||||||
|
.idea/
|
||||||
|
.vscode/
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
|
*~
|
||||||
|
|
||||||
|
# ── OS ───────────────────────────────────────────────────────────────
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
|
||||||
|
# ── Obsidian (local uniquement) ───────────────────────────────────────
|
||||||
|
.obsidian/
|
||||||
140
README.md
Normal file
140
README.md
Normal file
|
|
@ -0,0 +1,140 @@
|
||||||
|
# org.alpinux.owni
|
||||||
|
|
||||||
|
Accueil des projets de l'association **Alpinux** (le LUG de Savoie).
|
||||||
|
|
||||||
|
Chaque sous-dossier est un dépôt git indépendant avec son propre remote sur Gitea.
|
||||||
|
Ce dossier racine est un espace de travail local — il n'a pas de remote git.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Projets
|
||||||
|
|
||||||
|
| Dossier | Domaine | Technologie | Dépôt Gitea |
|
||||||
|
|---------|---------|-------------|-------------|
|
||||||
|
| `admin/` | admin.alpinux.org | Flask + AlpID | [alpinux-admin](https://gitea.alpinux.org/alpinux.cedrica5l/alpinux-admin) |
|
||||||
|
| `dynamic/` | dynamic.alpinux.org | Flask + AlpID | [alpinux-dynamic](https://gitea.alpinux.org/alpinux.cedrica5l/alpinux-dynamic) |
|
||||||
|
| `feedback/` | feedback.alpinux.org | à construire | [alpinux-feedback](https://gitea.alpinux.org/alpinux.cedrica5l/alpinux-feedback) |
|
||||||
|
| `home/` | alpinux.org | HTML statique | [alpinux-home](https://gitea.alpinux.org/alpinux.cedrica5l/alpinux-home) |
|
||||||
|
| `portail/` | portail.alpinux.org | en construction | [alpinux-portail](https://gitea.alpinux.org/alpinux.cedrica5l/alpinux-portail) |
|
||||||
|
| `static/` | static.alpinux.org | Flask + AlpID + CDN | [alpinux-static](https://gitea.alpinux.org/alpinux.cedrica5l/alpinux-static) |
|
||||||
|
| `wiki/` | wiki.alpinux.org | MkDocs Material | [alpinux-wiki](https://gitea.alpinux.org/alpinux.cedrica5l/alpinux-wiki) |
|
||||||
|
| `infra/` | — | Configs Apache + systemd | dépôt git local séparé |
|
||||||
|
|
||||||
|
Gitea : **https://gitea.alpinux.org/alpinux.cedrica5l**
|
||||||
|
ISPConfig : **https://owni.alpinux.org:8080**
|
||||||
|
AlpID (SSO) : **https://alpid.alpinux.org** — realm `master`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Procédure de déploiement
|
||||||
|
|
||||||
|
### Principe
|
||||||
|
|
||||||
|
```
|
||||||
|
poste local → git push → Gitea → serveur (git pull + restart)
|
||||||
|
```
|
||||||
|
|
||||||
|
Les mises à jour passent exclusivement par git.
|
||||||
|
La configuration d'environnement (`.env`) est la seule opération manuelle tolérée sur le serveur.
|
||||||
|
|
||||||
|
### Flask (admin, dynamic, static)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Poste local
|
||||||
|
git push origin main
|
||||||
|
|
||||||
|
# Serveur (via SSH ponctuel)
|
||||||
|
ssh alpinux.org
|
||||||
|
cd /opt/<service>
|
||||||
|
git pull
|
||||||
|
source venv/bin/activate && pip install -r requirements.txt
|
||||||
|
sudo systemctl restart <service>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Wiki
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd wiki
|
||||||
|
mkdocs build --strict
|
||||||
|
rsync -rlcz --delete site/ alpinux.org:/var/www/wiki.alpinux.org/web/
|
||||||
|
```
|
||||||
|
|
||||||
|
### Assets CDN (static.alpinux.org)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd static
|
||||||
|
scripts/push-assets.sh # rsync vers /var/www/clients/.../web/
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Développement local
|
||||||
|
|
||||||
|
| Projet | Commande | URL |
|
||||||
|
|--------|----------|-----|
|
||||||
|
| `wiki` | `mkdocs serve` | http://localhost:8000 |
|
||||||
|
| `dynamic` | `flask run --port 5000` | http://localhost:5000 |
|
||||||
|
| `admin` | `flask run --port 5001` | http://localhost:5001 |
|
||||||
|
| `static` | `python app/app.py` | http://localhost:5003 |
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd <projet>
|
||||||
|
python3 -m venv venv && source venv/bin/activate
|
||||||
|
pip install -r requirements.txt
|
||||||
|
cp .env.example .env && nano .env
|
||||||
|
flask run --port <port>
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Authentification AlpID
|
||||||
|
|
||||||
|
Tous les projets Flask utilisent **AlpID** (SSO Keycloak).
|
||||||
|
|
||||||
|
- Chaque projet a son propre client Keycloak (`admin`, `dynamic`, `static-cdn`, …)
|
||||||
|
- Scopes : `openid profile email`
|
||||||
|
- Autorisation : claim `groups` → sinon `ADMIN_EMAILS` → sinon tout utilisateur AlpID
|
||||||
|
- Discovery URL : `https://alpid.alpinux.org/realms/master/.well-known/openid-configuration`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Règle Claude Code
|
||||||
|
|
||||||
|
Lancer Claude depuis le sous-dossier du projet pour limiter le contexte :
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd ~/Projects/org.alpinux.owni/static && claude
|
||||||
|
cd ~/Projects/org.alpinux.owni/admin && claude
|
||||||
|
cd ~/Projects/org.alpinux.owni/dynamic && claude
|
||||||
|
cd ~/Projects/org.alpinux.owni/wiki && claude
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Accès SSH et rôle d'abonnelc
|
||||||
|
|
||||||
|
Alias SSH : `alpinux.org` → compte `abonnelc`.
|
||||||
|
|
||||||
|
`abonnelc` est un **compte d'administration ponctuelle**, pas un compte de service.
|
||||||
|
Son rôle se limite à :
|
||||||
|
|
||||||
|
- créer ou modifier les fichiers `.env` sur le serveur
|
||||||
|
- redémarrer un service après un `git pull`
|
||||||
|
- effectuer des opérations admin exceptionnelles
|
||||||
|
|
||||||
|
Les services tournent sous leurs propres utilisateurs système.
|
||||||
|
Les scripts ne doivent pas être couplés à `abonnelc`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Infra
|
||||||
|
|
||||||
|
`infra/` est un dépôt git local indépendant (pas de remote Gitea).
|
||||||
|
Il contient les configurations de référence pour audit et reconstruction :
|
||||||
|
|
||||||
|
```
|
||||||
|
infra/
|
||||||
|
├── conf/ → VirtualHost Apache par service
|
||||||
|
├── services/ → Units systemd
|
||||||
|
└── docs/ → Documentation déploiement par service
|
||||||
|
```
|
||||||
Loading…
Reference in a new issue