feat: déploiement initial recette Santinova

This commit is contained in:
Manus Deploy
2026-04-28 12:12:13 -04:00
parent 54f3f8eeef
commit 1ddb715eda
3 changed files with 156 additions and 0 deletions

68
Dockerfile Normal file
View File

@@ -0,0 +1,68 @@
# ============================================================
# STAGE 1: Build Frontend + Backend
# ============================================================
FROM node:22-alpine AS builder
# Install system dependencies for sharp and pdf processing
RUN apk add --no-cache \
python3 \
make \
g++ \
poppler-utils \
vips-dev
WORKDIR /app
# Install pnpm
RUN npm install -g pnpm@10.4.1
# Copy package files
COPY package.json pnpm-lock.yaml ./
COPY patches/ ./patches/
# Install dependencies
RUN pnpm install --frozen-lockfile
# Copy source code
COPY . .
# Build frontend + backend
RUN pnpm build
# ============================================================
# STAGE 2: Production image
# ============================================================
FROM node:22-alpine AS production
# Install runtime dependencies
RUN apk add --no-cache \
poppler-utils \
vips \
curl
WORKDIR /app
# Install pnpm for production deps
RUN npm install -g pnpm@10.4.1
# Copy package files
COPY package.json pnpm-lock.yaml ./
COPY patches/ ./patches/
# Install production dependencies only
RUN pnpm install --frozen-lockfile --prod
# Copy built assets from builder
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/client/dist ./client/dist
# Copy drizzle migrations
COPY drizzle/ ./drizzle/
COPY drizzle.config.ts ./
# Create uploads directory
RUN mkdir -p /app/uploads
EXPOSE 3000
CMD ["node", "dist/index.js"]