seed data

This commit is contained in:
2025-12-30 18:33:15 +01:00
parent 83371ea839
commit 92226800df
306 changed files with 1753 additions and 501 deletions

View File

@@ -10,6 +10,7 @@ const nextConfig = {
// Fix for monorepos: point tracing to repo root (portable across machines/containers)
outputFileTracingRoot: path.join(__dirname, '../..'),
images: {
unoptimized: process.env.NODE_ENV === 'development',
remotePatterns: [
{
protocol: 'https',
@@ -19,23 +20,34 @@ const nextConfig = {
protocol: 'https',
hostname: 'picsum.photos',
},
{
protocol: 'http',
hostname: 'localhost',
port: '3001',
},
{
protocol: 'https',
hostname: 'api.gridpilot.io',
},
{
protocol: 'http',
hostname: 'api',
port: '3000',
},
],
dangerouslyAllowSVG: true,
contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;",
contentDispositionType: 'inline',
},
async rewrites() {
const rawBaseUrl =
process.env.API_BASE_URL ??
process.env.NEXT_PUBLIC_API_BASE_URL ??
'http://localhost:3001';
const baseUrl = rawBaseUrl.endsWith('/') ? rawBaseUrl.slice(0, -1) : rawBaseUrl;
// Always use the internal Docker API URL in development
// This ensures the website container can fetch images during optimization
const baseUrl = 'http://api:3000';
return [
{
source: '/api/media/:path*',
destination: `${baseUrl}/media/:path*`,
source: '/api/:path*',
destination: `${baseUrl}/:path*`,
},
];
},