diff --git a/RESUME-DEPLOIEMENT.md b/RESUME-DEPLOIEMENT.md deleted file mode 100644 index 8af0488..0000000 --- a/RESUME-DEPLOIEMENT.md +++ /dev/null @@ -1,143 +0,0 @@ -# Résumé du déploiement - zapwall.fr - -## ✅ Actions effectuées - -1. **Déploiement initial** : Application déployée sur `/var/www/zapwall.fr` -2. **Service systemd** : Service `zapwall.service` créé et actif -3. **Configuration nginx** : Reverse proxy configuré dans le conteneur Docker -4. **HTTPS** : Configuration HTTPS avec redirection automatique HTTP → HTTPS -5. **Firewall** : Ports 80 et 443 ouverts - -## 📍 État actuel - -- **Service** : ✅ Actif sur le port 3001 -- **Répertoire** : `/var/www/zapwall.fr` (correct) -- **HTTPS** : ✅ Configuré avec certificats auto-signés -- **Certificats Let's Encrypt** : ⚠️ Non obtenus (bug certbot avec Python 3.11) - -## 🔧 Problèmes identifiés et solutions - -### 1. Certificats Let's Encrypt - -**Problème** : Certbot présente un bug (AttributeError) avec Python 3.11 - -**Solutions** : -- Utiliser certbot via snap (recommandé) : - ```bash - ssh debian@92.243.27.35 - sudo snap install certbot --classic - sudo docker stop lecoffre_nginx_test - sudo certbot certonly --standalone -d zapwall.fr --non-interactive --agree-tos --email admin@zapwall.fr - sudo docker start lecoffre_nginx_test - ``` - -### 2. Configuration nginx - -**Vérification** : La configuration pointe bien vers le port 3001 (correct) -- `proxy_pass http://172.17.0.1:3001;` ✅ - -**Note** : La configuration principale nginx.conf contient aussi une config pour `test-lecoffreio.4nkweb.com`, mais elle ne devrait pas interférer car elle utilise un `server_name` différent. - -## 📝 Mise à jour du site depuis Git - -### Méthode recommandée : Script automatique - -Depuis votre machine locale, dans le répertoire du projet : - -```bash -# Mise à jour depuis la branche actuelle -./update-from-git.sh - -# Ou spécifier une branche -./update-from-git.sh main -``` - -Le script : -1. Transfère les fichiers depuis votre dépôt Git local -2. Installe les dépendances (`npm ci`) -3. Construit l'application (`npm run build`) -4. Redémarre le service -5. Vérifie que tout fonctionne - -### Méthode manuelle - -Si vous préférez faire manuellement : - -```bash -# 1. Transférer les fichiers -tar --exclude='node_modules' \ - --exclude='.next' \ - --exclude='.git' \ - --exclude='*.tsbuildinfo' \ - --exclude='.env*.local' \ - --exclude='.cursor' \ - -czf - . | ssh debian@92.243.27.35 "cd /var/www/zapwall.fr && tar -xzf -" - -# 2. Sur le serveur -ssh debian@92.243.27.35 -cd /var/www/zapwall.fr -npm ci -npm run build -sudo systemctl restart zapwall -``` - -### Initialiser un dépôt Git sur le serveur (optionnel) - -Si vous voulez pouvoir faire `git pull` directement sur le serveur : - -```bash -ssh debian@92.243.35 -cd /var/www/zapwall.fr -git init -git remote add origin https://git.4nkweb.com/4nk/story-research-zapwall.git -git fetch origin -git checkout main # ou la branche souhaitée -``` - -Ensuite, vous pourrez utiliser : -```bash -ssh debian@92.243.27.35 'cd /var/www/zapwall.fr && git pull && npm ci && npm run build && sudo systemctl restart zapwall' -``` - -## 🔍 Commandes de vérification - -### Vérifier le service -```bash -ssh debian@92.243.27.35 'sudo systemctl status zapwall' -``` - -### Voir les logs -```bash -ssh debian@92.243.27.35 'sudo journalctl -u zapwall -f' -``` - -### Vérifier le port -```bash -ssh debian@92.243.27.35 'sudo ss -tuln | grep 3001' -``` - -### Vérifier la configuration nginx -```bash -ssh debian@92.243.27.35 'sudo docker exec lecoffre_nginx_test cat /etc/nginx/conf.d/zapwall.fr.conf' -``` - -## 📚 Fichiers de documentation créés - -- `README-DEPLOYMENT.md` : Guide complet de déploiement et mise à jour -- `update-from-git.sh` : Script de mise à jour automatique -- `fix-nginx-config.sh` : Script de correction de la configuration -- `check-deployment-status.sh` : Script de vérification de l'état - -## 🚀 Prochaines étapes recommandées - -1. **Obtenir les certificats Let's Encrypt** via snap (voir ci-dessus) -2. **Configurer le renouvellement automatique** des certificats -3. **Tester l'accès** au site en HTTPS -4. **Configurer un dépôt Git sur le serveur** pour faciliter les mises à jour - -## ⚠️ Notes importantes - -- Le site fonctionne actuellement avec des certificats auto-signés (avertissement navigateur) -- Les modifications de code nécessitent un rebuild et un redémarrage du service -- Le service doit être actif pour que le site soit accessible -- Nginx fait un reverse proxy vers le port 3001 où tourne l'application Next.js diff --git a/components/ArticleFilters.tsx b/components/ArticleFilters.tsx index 422fed7..8b03450 100644 --- a/components/ArticleFilters.tsx +++ b/components/ArticleFilters.tsx @@ -109,7 +109,7 @@ export function ArticleFiltersComponent({ }: ArticleFiltersProps): React.ReactElement { const data = useFiltersData(articles) - const handleClearFilters = () => { + const handleClearFilters = (): void => { onFiltersChange({ authorPubkey: null, sortBy: 'newest', diff --git a/components/AuthorFilterDropdown.tsx b/components/AuthorFilterDropdown.tsx index 860d2e4..29e8074 100644 --- a/components/AuthorFilterDropdown.tsx +++ b/components/AuthorFilterDropdown.tsx @@ -64,7 +64,7 @@ export function AllAuthorsOption({ value: string | null onChange: (value: string | null) => void setIsOpen: (open: boolean) => void -}) { +}): React.ReactElement { return (