mirror of
https://github.com/arthur-pbty/chrono.git
synced 2026-06-03 15:07:21 +02:00
chore: update dependencies and add postcss configuration
- Updated Next.js to version 16.2.4 - Updated Tailwind CSS and PostCSS to their latest versions - Added autoprefixer to PostCSS configuration - Created a .dockerignore file to exclude unnecessary files from Docker context
This commit is contained in:
+11
-22
@@ -1,34 +1,23 @@
|
||||
# === Étape 1 : Build ===
|
||||
FROM node:20-alpine AS builder
|
||||
# ---------- BASE ----------
|
||||
FROM node:20-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copier les fichiers de dépendances pour profiter du cache Docker
|
||||
COPY package*.json ./
|
||||
|
||||
# Installer uniquement ce qu'il faut pour le build
|
||||
# ---------- INSTALL DEPS ----------
|
||||
COPY package.json package-lock.json* ./
|
||||
RUN npm ci
|
||||
|
||||
# Copier tout le code
|
||||
# ---------- COPY SOURCE ----------
|
||||
COPY . .
|
||||
|
||||
# Build Next.js pour la production
|
||||
# ---------- BUILD (OBLIGATOIRE POUR next start) ----------
|
||||
RUN npm run build
|
||||
|
||||
# === Étape 2 : Runner léger ===
|
||||
FROM node:20-alpine AS runner
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copier uniquement ce qui est nécessaire pour la prod
|
||||
COPY --from=builder /app/package*.json ./
|
||||
COPY --from=builder /app/node_modules ./node_modules
|
||||
COPY --from=builder /app/.next ./.next
|
||||
COPY --from=builder /app/public ./public
|
||||
|
||||
# Mode production
|
||||
# ---------- ENV ----------
|
||||
ENV NODE_ENV=production
|
||||
ENV PORT=3000
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
# Lancer le serveur Next.js
|
||||
CMD ["npm", "start"]
|
||||
# ---------- START ----------
|
||||
CMD ["npm", "run", "start"]
|
||||
Reference in New Issue
Block a user