chore: update docker-compose configuration for improved volume management and add optimizations in next.config.js for Docker development

This commit is contained in:
Julien Froidefond
2025-10-16 14:50:03 +02:00
parent ef4de29282
commit 9ecdd72804
2 changed files with 26 additions and 2 deletions

View File

@@ -11,7 +11,14 @@ services:
ports:
- "3020:3000"
volumes:
- .:/app
- ./src:/app/src
- ./public:/app/public
- ./package.json:/app/package.json
- ./pnpm-lock.yaml:/app/pnpm-lock.yaml
- ./tsconfig.json:/app/tsconfig.json
- ./tailwind.config.ts:/app/tailwind.config.ts
- ./postcss.config.js:/app/postcss.config.js
- ./next.config.js:/app/next.config.js
- /app/node_modules
- /app/.next
- pnpm_store:/app/.pnpm-store
@@ -21,7 +28,8 @@ services:
- MONGO_PASSWORD=password123
- MONGODB_URI=mongodb://admin:password123@mongodb:27017/stripstream?authSource=admin
- PNPM_HOME=/app/.pnpm-store
command: sh -c "pnpm config set store-dir /app/.pnpm-store && pnpm install && pnpm dev"
- WATCHPACK_POLLING=true
command: sh -c "pnpm config set store-dir /app/.pnpm-store && pnpm install --frozen-lockfile && pnpm dev"
mongodb:
image: mongo:latest

View File

@@ -9,6 +9,22 @@ const nextConfig = {
},
// Configuration pour améliorer la résolution DNS
serverExternalPackages: ['dns'],
// Optimisations pour Docker dev
experimental: {
turbo: {
rules: {
'*.svg': {
loaders: ['@svgr/webpack'],
as: '*.js',
},
},
},
},
// Optimisation du cache en dev
onDemandEntries: {
maxInactiveAge: 25 * 1000,
pagesBufferLength: 2,
},
};
module.exports = nextConfig;