fix: créer .techradar manuellement au lieu d'utiliser techradar install

- Le script techradar.js ne prend pas 'install' comme paramètre
- Création manuelle de .techradar en copiant depuis node_modules/aoe_technology_radar
- Création du fichier hash pour éviter la recréation à chaque fois
- Cela évite les problèmes avec la commande 'install' qui n'existe pas
This commit is contained in:
syoul
2025-12-03 15:54:35 +01:00
parent c84392a7ff
commit 987ffb2da1

View File

@@ -26,9 +26,12 @@ COPY . .
RUN chmod +x scripts/start-business.sh RUN chmod +x scripts/start-business.sh
# Préparer .techradar une fois pour toutes (évite les réinstallations au runtime) # Préparer .techradar une fois pour toutes (évite les réinstallations au runtime)
# Vérifier que le binaire existe et utiliser node pour l'exécuter # Le script techradar.js crée automatiquement .techradar lors de l'exécution
RUN ls -la node_modules/.bin/techradar || (echo "techradar binary not found" && ls -la node_modules/.bin/ | head -10 && exit 1) # On peut déclencher la création en exécutant le script avec un paramètre qui ne fait rien
RUN node node_modules/aoe_technology_radar/bin/techradar.js install # ou simplement en copiant manuellement et en installant
RUN mkdir -p .techradar && \
cp -r node_modules/aoe_technology_radar/* .techradar/ && \
echo "$(node -e \"const crypto=require('crypto');const fs=require('fs');console.log(crypto.createHash('sha256').update(fs.readFileSync('package.json')).digest('hex'))\")" > .techradar/hash
RUN node -e "const fs=require('fs');const p='.techradar/package.json';if(!fs.existsSync(p)){console.error('.techradar/package.json not found');process.exit(1);}const pkg=JSON.parse(fs.readFileSync(p,'utf8'));pkg.scripts=pkg.scripts||{};pkg.scripts.prepare='';fs.writeFileSync(p,JSON.stringify(pkg,null,2));" RUN node -e "const fs=require('fs');const p='.techradar/package.json';if(!fs.existsSync(p)){console.error('.techradar/package.json not found');process.exit(1);}const pkg=JSON.parse(fs.readFileSync(p,'utf8'));pkg.scripts=pkg.scripts||{};pkg.scripts.prepare='';fs.writeFileSync(p,JSON.stringify(pkg,null,2));"
RUN cd .techradar && npm install --legacy-peer-deps RUN cd .techradar && npm install --legacy-peer-deps
RUN cd .techradar && npm run build:icons RUN cd .techradar && npm run build:icons