ci/woodpecker/push/woodpecker Pipeline failed
- la dép git+ssh échouait en CI : pas de clé SSH ni de binaire git dans l'étape build (ENOENT sur git clone) — seule la prod installait git - package.json + pnpm-lock : git+https://git.open.us.org/… (#v0.1.0 → b1c6a2f, même commit épinglé) — nécessite le repo yvv-nuxt-base public - git + ca-certificates ajoutés à l'étape build du Dockerfile - vérifié : pnpm install + build zéro erreur, prod :3099 → 200 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
52 lines
1.1 KiB
Docker
52 lines
1.1 KiB
Docker
# syntax = docker/dockerfile:1
|
|
|
|
ARG NODE_VERSION=23.11.0-slim
|
|
|
|
FROM node:${NODE_VERSION} AS base
|
|
|
|
ARG PORT=3000
|
|
|
|
WORKDIR /app
|
|
|
|
# Build
|
|
FROM base AS build
|
|
|
|
# git requis : dépendance @yvv/nuxt-base en git+https (l'image slim n'a pas git)
|
|
RUN apt-get update && apt-get -fy install git ca-certificates && rm -rf /var/cache/apt/*
|
|
|
|
RUN corepack enable
|
|
|
|
COPY package.json pnpm-lock.yaml ./
|
|
RUN pnpm install --frozen-lockfile
|
|
RUN pnpm rebuild sharp
|
|
|
|
COPY . .
|
|
|
|
RUN sh scripts/copy-pdfjs.sh
|
|
RUN pnpm run build
|
|
|
|
# Production
|
|
FROM base AS production
|
|
|
|
ENV PORT=${PORT}
|
|
ENV NODE_ENV=production
|
|
|
|
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
|
|
|
|
EXPOSE $PORT
|
|
CMD [ "node", ".output/server/index.mjs" ]
|
|
|
|
# Development
|
|
FROM base AS development
|
|
WORKDIR /app
|
|
|
|
RUN corepack enable
|
|
ENTRYPOINT [ "pnpm", "run", "dev" ]
|