- Add Dockerfile with multi-stage build for production - Add docker-compose.yml for easy deployment - Add .dockerignore to exclude unnecessary files - Add DOCKER_SETUP.md with comprehensive setup guide - Update next.config.js to enable standalone output mode - Configure app to run on port 3500 - Keep MySQL server external to Docker
24 lines
584 B
JavaScript
24 lines
584 B
JavaScript
/** @type {import('next').NextConfig} */
|
|
const nextConfig = {
|
|
output: 'standalone',
|
|
experimental: {
|
|
optimizePackageImports: ['lucide-react'],
|
|
},
|
|
compiler: {
|
|
removeConsole: process.env.NODE_ENV === 'production' ? {
|
|
exclude: ['error', 'warn'],
|
|
} : false,
|
|
},
|
|
// Enable SWC minification for better performance
|
|
swcMinify: true,
|
|
// Optimize images
|
|
images: {
|
|
formats: ['image/avif', 'image/webp'],
|
|
},
|
|
// Enable compression
|
|
compress: true,
|
|
// Production source maps (smaller)
|
|
productionBrowserSourceMaps: false,
|
|
}
|
|
|
|
module.exports = nextConfig |