Initial commit - import depuis serveur de production

This commit is contained in:
manus-admin
2026-05-31 22:01:16 +02:00
commit f93a77758a
282 changed files with 55903 additions and 0 deletions

52
Dockerfile Normal file
View File

@@ -0,0 +1,52 @@
# ─── Stage 1: Build ───────────────────────────────────────────────────────────
FROM node:22-slim AS builder
# Install pnpm
RUN corepack enable && corepack prepare pnpm@10.4.1 --activate
WORKDIR /app
# Copy package files first for better layer caching
COPY package.json pnpm-lock.yaml ./
COPY patches/ ./patches/
# Install all dependencies (including devDependencies for build)
RUN pnpm install --frozen-lockfile
# Copy source code
COPY . .
# Build frontend (Vite) and backend (esbuild)
RUN pnpm run build
# ─── Stage 2: Production ─────────────────────────────────────────────────────
FROM node:22-slim AS production
# Install pnpm
RUN corepack enable && corepack prepare pnpm@10.4.1 --activate
WORKDIR /app
# Copy package files
COPY package.json pnpm-lock.yaml ./
COPY patches/ ./patches/
# Install ALL dependencies (vite is imported at top-level in the bundle even though
# it is only used in dev mode; esbuild marks it as external so it must be present)
RUN pnpm install --frozen-lockfile
# Copy built artifacts from builder
COPY --from=builder /app/dist ./dist
# Copy drizzle migrations
COPY drizzle/ ./drizzle/
COPY drizzle.config.ts ./
# Set environment
ENV NODE_ENV=production
ENV PORT=3000
EXPOSE 3000
# Start the application
CMD ["node", "dist/index.js"]