fix: copier les fichiers nécessaires dans .techradar avant le build
- Copie de radar, public, config.json, about.md, custom.css dans .techradar - Exécution de build:data avant build pour générer les données - Cela reproduit ce que fait techradar.js automatiquement - Le build devrait maintenant fonctionner correctement
This commit is contained in:
@@ -44,9 +44,16 @@ RUN cp radar-business/config-business.json config.json && \
|
||||
mkdir -p radar/2025-01-15 && \
|
||||
cp -r radar-business/2025-01-15/* radar/2025-01-15/
|
||||
|
||||
# Copier les fichiers nécessaires dans .techradar avant le build (comme le fait techradar.js)
|
||||
RUN mkdir -p .techradar/data && \
|
||||
cp -r radar .techradar/data/radar && \
|
||||
cp -r public .techradar/public && \
|
||||
cp config.json .techradar/data/config.json && \
|
||||
cp about.md .techradar/data/about.md 2>/dev/null || echo "about.md not found, skipping" && \
|
||||
cp custom.css .techradar/src/styles/custom.css 2>/dev/null || echo "custom.css not found, skipping"
|
||||
|
||||
# Builder l'application en mode production pour éviter Fast Refresh
|
||||
# Vérifier que npm est disponible et que le script build existe
|
||||
RUN cd .techradar && npm --version && npm run build || (echo "Build failed, checking package.json..." && cat package.json | grep -A 5 scripts && exit 1)
|
||||
RUN cd .techradar && npm run build:data && npm run build
|
||||
|
||||
# Exposition du port interne
|
||||
EXPOSE 3000
|
||||
|
||||
Reference in New Issue
Block a user