Fix build prod : postinstall tolérant + copy-pdfjs dans Dockerfile
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
- 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 <noreply@anthropic.com>
This commit is contained in:
@@ -19,6 +19,7 @@ RUN pnpm rebuild sharp
|
|||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
RUN sh scripts/copy-pdfjs.sh
|
||||||
RUN pnpm run build
|
RUN pnpm run build
|
||||||
|
|
||||||
# Production
|
# 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/.output /app/.output
|
||||||
COPY --from=build /app/site /app/site
|
COPY --from=build /app/site /app/site
|
||||||
|
COPY --from=build /app/content /app/content
|
||||||
|
|
||||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
||||||
CMD curl -f http://localhost:${PORT}/api/health || exit 1
|
CMD curl -f http://localhost:${PORT}/api/health || exit 1
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"dev": "nuxt dev",
|
"dev": "nuxt dev",
|
||||||
"generate": "nuxt generate",
|
"generate": "nuxt generate",
|
||||||
"preview": "nuxt preview",
|
"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": {
|
"dependencies": {
|
||||||
"@nuxt/content": "^3.11.2",
|
"@nuxt/content": "^3.11.2",
|
||||||
|
|||||||
Reference in New Issue
Block a user