From 17f39e735d64d7d7c86552a7d25529fac8236082 Mon Sep 17 00:00:00 2001 From: Yvv Date: Sat, 28 Feb 2026 19:26:05 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20build=20prod=20:=20postinstall=20tol?= =?UTF-8?q?=C3=A9rant=20+=20copy-pdfjs=20dans=20Dockerfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - postinstall : test -f avant d'appeler copy-pdfjs.sh (absent pendant pnpm install Docker) - Dockerfile : RUN copy-pdfjs.sh après COPY . . pour copier les fichiers PDF.js - Dockerfile : COPY content/ en production pour Nuxt Content Co-Authored-By: Claude Opus 4.6 --- docker/Dockerfile | 2 ++ package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 85f2937..d414adf 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -19,6 +19,7 @@ RUN pnpm rebuild sharp COPY . . +RUN sh scripts/copy-pdfjs.sh RUN pnpm run build # Production @@ -31,6 +32,7 @@ RUN apt-get update && apt-get -fy install curl git && rm -rf /var/cache/apt/* COPY --from=build /app/.output /app/.output COPY --from=build /app/site /app/site +COPY --from=build /app/content /app/content HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \ CMD curl -f http://localhost:${PORT}/api/health || exit 1 diff --git a/package.json b/package.json index 6a8388e..086f126 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "dev": "nuxt dev", "generate": "nuxt generate", "preview": "nuxt preview", - "postinstall": "nuxt prepare && sh scripts/copy-pdfjs.sh" + "postinstall": "nuxt prepare && (test -f scripts/copy-pdfjs.sh && sh scripts/copy-pdfjs.sh || true)" }, "dependencies": { "@nuxt/content": "^3.11.2",