summaryrefslogtreecommitdiff
path: root/app-management.md
diff options
context:
space:
mode:
Diffstat (limited to 'app-management.md')
-rw-r--r--app-management.md41
1 files changed, 40 insertions, 1 deletions
diff --git a/app-management.md b/app-management.md
index 233ec1f..1f9f326 100644
--- a/app-management.md
+++ b/app-management.md
@@ -108,9 +108,22 @@ sudo docker compose logs -f backend
curl -v http://localhost:9000/store/products
```
-- `curl -v` : verifie que l'API repond et montre les details de connexion.
+- `curl` : envoie une requete HTTP simple.
+- `-v` : mode verbeux (montre la requete, la reponse et les details reseau).
+- `http://localhost:9000/store/products` : endpoint public des produits.
- Si "connection reset by peer" -> le backend crash apres accept.
+### C.1) Test CORS (depuis le serveur)
+
+```
+curl -i -H "Origin: http://192.168.99.22:8000" http://192.168.99.22:9000/store/products
+```
+
+- `-i` : affiche les en-tetes HTTP de la reponse (utile pour CORS).
+- `-H "Origin: ..."` : simule l'origine du navigateur (storefront).
+- `http://192.168.99.22:9000/store/products` : endpoint backend teste.
+- Attendu : `Access-Control-Allow-Origin: http://192.168.99.22:8000`.
+
### D) Verifier la base (depuis un conteneur temporaire)
```
@@ -516,3 +529,29 @@ git push origin docs-git-dns
git stash pop
```
+### J) Pousser depuis antel puis recuperer sur huitral (branche main)
+
+Objectif : publier les changements faits sur antel, puis les recuperer sur huitral.
+
+Sur antel (branche `main`) :
+```
+git status
+git restore error_file_a.txt
+git add app-management.md docker-compose.yml storefront/Dockerfile
+git commit -m "chore: update docs and docker"
+git push origin main
+```
+
+- `restore error_file_a.txt` : retire un fichier local non souhaite.
+- `add ...` : commit uniquement les fichiers voulus (sans `.env`).
+
+Sur huitral (recuperer le dernier code) :
+```
+cd /var/www/lucien-sens-bon
+git fetch origin
+git checkout main
+git reset --hard origin/main
+```
+
+- `reset --hard` aligne strictement le code local sur la remote.
+