Files
librodrome/docker/Dockerfile
Yvv 9525ed3953
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Bouton PDF par chapitre, badges morceaux améliorés, PDF configurable admin, git sync admin→prod
- Bouton PDF blanc par chapitre avec numéro de page (ChapterHeader)
- Badges morceaux plus visibles (bordure, poids, hover) dans ChapterHeader et SongBadges
- PDF viewer : page cible + panneau signets ouverts par défaut (BookPdfReader)
- Config YAML : pdfFile dans book, chapterPages pour le mapping chapitre→page
- Admin book : section PDF du livre avec chemin éditable et sauvegarde
- Git sync automatique : chaque sauvegarde admin commit+push en prod (ADMIN_GIT_SYNC=true)
- Docker : git installé en prod, volumes pour .git/site/content/public

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 15:32:38 +01:00

47 lines
843 B
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
RUN corepack enable
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
RUN pnpm rebuild sharp
COPY . .
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
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" ]