Files
portfolio/next.config.ts
denshooter 519ca43168
Some checks failed
CI/CD Pipeline / test (push) Successful in 10m55s
CI/CD Pipeline / security (push) Failing after 5m20s
CI/CD Pipeline / build (push) Has been skipped
CI/CD Pipeline / deploy (push) Has been skipped
Update Dockerfile and Next.js configuration; enhance contact components
- Modify Dockerfile to install curl without recommended packages for a leaner image.
- Update Next.js configuration to set outputFileTracingRoot for better Docker compatibility.
- Revise contact components to improve messaging and clarity, changing "Get In Touch" to "Contact Me" and enhancing descriptions for collaboration opportunities.
- Clean up Prisma schema by removing unnecessary comments and restructuring the Project model for clarity.
2025-09-11 10:13:35 +02:00

71 lines
1.7 KiB
TypeScript

import type { NextConfig } from "next";
import dotenv from "dotenv";
import path from "path";
// Lade die .env Datei aus dem Arbeitsverzeichnis
dotenv.config({ path: path.resolve(__dirname, '.env') });
const nextConfig: NextConfig = {
// Enable standalone output for Docker
output: 'standalone',
outputFileTracingRoot: path.join(__dirname, '../../'),
// Optimize for production
compress: true,
poweredByHeader: false,
// Disable ESLint during build for Docker
eslint: {
ignoreDuringBuilds: process.env.NODE_ENV === 'production',
},
// Environment variables
env: {
NEXT_PUBLIC_BASE_URL: process.env.NEXT_PUBLIC_BASE_URL
},
serverRuntimeConfig: {
GHOST_API_URL: process.env.GHOST_API_URL,
GHOST_API_KEY: process.env.GHOST_API_KEY,
MY_EMAIL: process.env.MY_EMAIL,
MY_INFO_EMAIL: process.env.MY_INFO_EMAIL,
MY_PASSWORD: process.env.MY_PASSWORD,
MY_INFO_PASSWORD: process.env.MY_INFO_PASSWORD
},
// Performance optimizations
experimental: {
optimizePackageImports: ['lucide-react', 'framer-motion'],
},
// Image optimization
images: {
formats: ['image/webp', 'image/avif'],
minimumCacheTTL: 60,
},
// Dynamic routes are handled automatically by Next.js
// Add cache-busting headers
async headers() {
return [
{
source: '/(.*)',
headers: [
{
key: 'Cache-Control',
value: 'public, max-age=0, must-revalidate',
},
],
},
];
},
};
import bundleAnalyzer from "@next/bundle-analyzer";
const withBundleAnalyzer = bundleAnalyzer({
enabled: process.env.ANALYZE === "true",
});
module.exports = withBundleAnalyzer(nextConfig);