Files
manus-admin 166729bdbc
All checks were successful
Validation applicative / TypeScript, tests et build (push) Successful in 5m10s
feat: ouvrir directement la connexion locale
2026-08-31 16:04:00 +02:00

46 lines
1.3 KiB
Docker
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
FROM node:20-alpine AS builder
WORKDIR /app
# Corepack applique la version de pnpm verrouillée dans package.json.
RUN corepack enable
COPY package.json pnpm-lock.yaml ./
COPY patches ./patches
RUN pnpm install --frozen-lockfile
COPY . .
# Les variables Vite doivent être disponibles pendant la compilation frontend.
ARG VITE_APP_ID
ARG VITE_OAUTH_PORTAL_URL
ARG VITE_APP_TITLE
ARG VITE_FRONTEND_FORGE_API_URL
ARG VITE_FRONTEND_FORGE_API_KEY
ARG VITE_ANALYTICS_ENDPOINT
ARG VITE_ANALYTICS_WEBSITE_ID
ARG VITE_APP_LOGO
ENV VITE_APP_ID=${VITE_APP_ID} \
VITE_OAUTH_PORTAL_URL=${VITE_OAUTH_PORTAL_URL} \
VITE_APP_TITLE=${VITE_APP_TITLE} \
VITE_FRONTEND_FORGE_API_URL=${VITE_FRONTEND_FORGE_API_URL} \
VITE_FRONTEND_FORGE_API_KEY=${VITE_FRONTEND_FORGE_API_KEY} \
VITE_ANALYTICS_ENDPOINT=${VITE_ANALYTICS_ENDPOINT} \
VITE_ANALYTICS_WEBSITE_ID=${VITE_ANALYTICS_WEBSITE_ID} \
VITE_APP_LOGO=${VITE_APP_LOGO}
RUN pnpm run build
# Limage dexécution nembarque ni TypeScript, ni Vite, ni les outils de test.
RUN pnpm prune --prod
FROM node:20-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/drizzle ./drizzle
COPY --from=builder /app/package.json ./package.json
EXPOSE 3000
CMD ["node", "dist/index.js"]