feat: Docker multi-stage build (Node build + nginx static serve)

This commit is contained in:
2026-02-22 20:04:08 +01:00
parent a4c4ac9e51
commit 1b09106aed
4 changed files with 98 additions and 0 deletions

22
docker-entrypoint.sh Normal file
View File

@@ -0,0 +1,22 @@
#!/bin/sh
set -e
# Vérifier que le build statique est présent
if [ ! -f "/usr/share/nginx/html/index.html" ]; then
echo "ERREUR: Build statique non trouvé (index.html manquant) !"
exit 1
fi
# Compter les fichiers servis
FILE_COUNT=$(find /usr/share/nginx/html -type f | wc -l)
echo "──────────────────────────────────────────"
echo " SimO — Simulateur de prêt immobilier"
echo "──────────────────────────────────────────"
echo " Fichiers statiques : ${FILE_COUNT}"
echo " Port : 3000"
echo " Serveur : nginx"
echo "──────────────────────────────────────────"
echo "Démarrage du serveur..."
# Exécuter la commande par défaut (nginx)
exec "$@"