refactor: pré-installer .techradar dans l'image

This commit is contained in:
syoul
2025-12-02 20:37:48 +01:00
parent 3fd77a135b
commit 053732cd13
2 changed files with 6 additions and 43 deletions

View File

@@ -7,6 +7,7 @@ WORKDIR /app
ENV HUSKY=0
ENV HUSKY_SKIP_INSTALL=1
ENV NODE_PATH=/app/node_modules
ENV NODE_ENV=development
# Installation des dépendances système
RUN apk add --no-cache git
@@ -15,16 +16,17 @@ RUN apk add --no-cache git
COPY package.json package-lock.json* ./
# Installation des dépendances Node
# Utilisation de --ignore-scripts pour éviter l'erreur husky
RUN npm install --legacy-peer-deps --ignore-scripts
# Installation des dépendances nécessaires au build
RUN npm install gray-matter glob
# Copie du reste du projet
COPY . .
RUN chmod +x scripts/start-business.sh
# Préparer .techradar une fois pour toutes (évite les réinstallations au runtime)
RUN npx techradar install && \
node -e "const fs=require('fs');const p='.techradar/package.json';const pkg=JSON.parse(fs.readFileSync(p,'utf8'));pkg.scripts=pkg.scripts||{};pkg.scripts.prepare='';fs.writeFileSync(p,JSON.stringify(pkg,null,2));" && \
cd .techradar && npm install --legacy-peer-deps && npm run build:icons && cd ..
# --- CONFIGURATION BUSINESS ---
# Application de la logique Business (remplacement de la config et des données)
RUN cp radar-business/config-business.json config.json && \