From cf94108aa6c3b02db2726ce7b7f67a0ac0910544 Mon Sep 17 00:00:00 2001 From: Michel Date: Wed, 9 Apr 2025 22:02:35 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Correction=20/=20ajout=20pour=20?= =?UTF-8?q?la=20prod?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 26 ++++++++++++++++++++------ deploy.sh.py | 19 +++++++++++++++++++ 2 files changed, 39 insertions(+), 6 deletions(-) create mode 100644 deploy.sh.py diff --git a/.gitignore b/.gitignore index 05dc513..c42663a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,26 @@ -# Python +# --- Environnements virtuels --- +.venv/ +env/ + +# --- Python cache & compilés --- __pycache__/ *.py[cod] *.log -# PyCharm +# --- IDEs (PyCharm, VSCode) --- .idea/ -*.iml +.vscode/ -# Environnement virtuel -.venv/ -env/ \ No newline at end of file +# --- fichiers système --- +.DS_Store +Thumbs.db + +# --- fichiers de test ou temporaires --- +*.bak +*.swp +*.tmp +*.old + +# --- Fichiers spécifiques si besoin --- +README.md.md +nv/ \ No newline at end of file diff --git a/deploy.sh.py b/deploy.sh.py new file mode 100644 index 0000000..1882366 --- /dev/null +++ b/deploy.sh.py @@ -0,0 +1,19 @@ +#!/bin/bash + +echo "🔄 Déploiement depuis Gitea - branche main" + +cd /home/debian/travail/Gestion_sondes || exit 1 + +# Récupération des dernières modifs +git fetch origin +git checkout main +git pull origin main + +# Sécurisation en lecture seule (facultatif mais recommandé) +chmod 444 Monitor.py Cuisine_*.py Streamlit.py + +# Redémarrage de Supervisor +echo "🔁 Redémarrage des services Supervisor..." +sudo supervisorctl restart all + +echo "✅ Déploiement terminé avec succès" \ No newline at end of file