Source : CLAUDE.md lignes 776-875
/stock_8to/33800-stack/scripts/
# Générer config
/stock_8to/33800-stack/scripts/nginx/generate.sh <project> <service> <env> <port>
# Déployer config
/stock_8to/33800-stack/scripts/nginx/deploy.sh <config_file>
# Tester + recharger
ssh gouroubleu@nginx.local "sudo nginx -t && sudo systemctl reload nginx"
| Machine | Cron | Schedule | Description |
|---|---|---|---|
| PVE | monitoring-33800 | 0 * * * * |
Collecte monitoring + génération dashboard |
| PVE | rsync-stock8-to-stock36 | 0 * * * * |
Sync horaire 33800-stack + backups |
| PVE | rsync-stock8-to-stock36 | 0 5 * * * |
Sync quotidien complet |
| PVE | nginx-logs-archive | 55 23 * * * |
Archivage logs nginx |
| PVE | zfsutils-linux | 1er dim/mois | ZFS TRIM |
| PVE | zfsutils-linux | 2ème dim/mois | ZFS Scrub |
| Proxmox 155 | rsync-stock1to-backup | 0 * * * * |
Sync stock_1to → stock_36to |
| GitLab | gitlab-backup | 0 */6 * * * |
Backup GitLab (6h) |
# /etc/cron.d/rsync-stock8-to-stock36
0 * * * * root rsync -av --delete /stock_8to/33800-stack/ /stock_36to/data/backup-stock8/33800-stack/
5 * * * * root rsync -av --delete /stock_8to/backups/ /stock_36to/data/backup-stock8/backups/
0 5 * * * root rsync -av --delete /stock_8to/ /stock_36to/data/backup-stock8/
# /etc/cron.d/monitoring-33800
0 * * * * gouroubleu /stock_8to/33800-stack/monitoring/collect.sh
# /etc/cron.d/gitlab-backup (sur gitlab.local)
0 */6 * * * root gitlab-backup create STRATEGY=copy SKIP=artifacts,registry
Les schedulers internes aux containers sont détectés automatiquement via scheduler.json.
Voir memory/docker.md section Convention scheduler.json.
Remote git : o2switch:repositories/dashboard.git
Post-receive hook (~/repositories/dashboard.git/hooks/post-receive) :
#!/bin/bash
TARGET="/home/deas8499/public_html/dashboard"
GIT_DIR="/home/deas8499/repositories/dashboard.git"
git --work-tree=$TARGET --git-dir=$GIT_DIR checkout -f main
# Fix permissions pour le serveur web
find $TARGET -type f -exec chmod 644 {} \;
find $TARGET -type d -exec chmod 755 {} \;
Note : Le chmod est nécessaire car git checkout préserve les permissions locales (600) qui bloquent Apache.
| Fichier | Problème | Solution |
|---|---|---|
services-registry.json |
Créé par root (cron) → git add échoue | sudo chown gouroubleu:gouroubleu services-registry.json |
assets/style.css |
Permissions 600 après checkout | Hook post-receive fait chmod 644 |
config.json : Ajouter le service dans la section services
"mon-service": {
"host": "prod-portainer",
"port": 1234,
"domain": "mon-service.33800.nowhere84.com",
"label": "Mon Service"
}
Navigation : Ajouter le lien dans generate.d/01-index.sh (section nav)
Page dediee (optionnel) : Creer generate.d/XX-monservice.sh
Regenerer : ./generate.sh
| Page | Script | Description |
|---|---|---|
| index.html | 01-index.sh | Dashboard principal |
| linkedin.html | 15-linkedin.sh | Connector LinkedIn |
| syncthing.html | 14-syncthing.sh | Sync Anbernic |
| raidz.html | 12-raidz.sh | Status ZFS |