feat: Docker multi-stage build (Node build + nginx static serve)
This commit is contained in:
22
docker-entrypoint.sh
Normal file
22
docker-entrypoint.sh
Normal 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 "$@"
|
||||
Reference in New Issue
Block a user