build fix

This commit is contained in:
2025-09-16 08:06:27 +02:00
parent c4c6643fd1
commit 56a88f0a68
14 changed files with 46 additions and 39 deletions

View File

@@ -23,8 +23,8 @@ COPY --from=deps /app/node_modules ./node_modules
COPY . . COPY . .
# Environment variables for build # Environment variables for build
ENV NEXT_TELEMETRY_DISABLED 1 ENV NEXT_TELEMETRY_DISABLED=1
ENV NODE_ENV production ENV NODE_ENV=production
# Build the application # Build the application
RUN \ RUN \
@@ -38,8 +38,8 @@ RUN \
FROM base AS runner FROM base AS runner
WORKDIR /app WORKDIR /app
ENV NODE_ENV production ENV NODE_ENV=production
ENV NEXT_TELEMETRY_DISABLED 1 ENV NEXT_TELEMETRY_DISABLED=1
# Create nextjs user # Create nextjs user
RUN addgroup --system --gid 1001 nodejs RUN addgroup --system --gid 1001 nodejs
@@ -61,8 +61,8 @@ USER nextjs
# Expose port # Expose port
EXPOSE 3000 EXPOSE 3000
ENV PORT 3000 ENV PORT=3000
ENV HOSTNAME "0.0.0.0" ENV HOSTNAME=0.0.0.0
# Start the application (standalone) # Start the application (standalone)
CMD ["node", "server.js"] CMD ["node", "server.js"]

View File

@@ -9,10 +9,8 @@ const nextConfig = {
typescript: { typescript: {
ignoreBuildErrors: true, ignoreBuildErrors: true,
}, },
experimental: {
// Enable standalone output for better Docker compatibility // Enable standalone output for better Docker compatibility
outputStandalone: true, output: 'standalone',
},
webpack: (config, { isServer, dev }) => { webpack: (config, { isServer, dev }) => {
config.resolve.alias = { config.resolve.alias = {
...config.resolve.alias, ...config.resolve.alias,

View File

@@ -18,7 +18,7 @@ import {
CheckCircle, CheckCircle,
XCircle XCircle
} from "lucide-react"; } from "lucide-react";
import { apiClient } from "../lib/api-client"; import { apiClient } from "@/lib/api-client";
interface SystemStats { interface SystemStats {
total_users: number; total_users: number;

View File

@@ -20,7 +20,7 @@ import {
RefreshCw RefreshCw
} from 'lucide-react'; } from 'lucide-react';
import { ProtectedRoute } from '@/components/auth/ProtectedRoute' import { ProtectedRoute } from '@/components/auth/ProtectedRoute'
import { apiClient } from '../lib/api-client' import { apiClient } from '@/lib/api-client'
interface AnalyticsData { interface AnalyticsData {
overview: { overview: {

View File

@@ -1,6 +1,7 @@
"use client"; "use client";
import { useState, useEffect } from "react"; import { useState, useEffect, Suspense } from "react";
export const dynamic = 'force-dynamic'
import { useSearchParams } from "next/navigation"; import { useSearchParams } from "next/navigation";
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
import { Button } from "@/components/ui/button"; import { Button } from "@/components/ui/button";
@@ -36,7 +37,7 @@ import {
Bot Bot
} from "lucide-react"; } from "lucide-react";
import { useToast } from "@/hooks/use-toast"; import { useToast } from "@/hooks/use-toast";
import { apiClient } from "../lib/api-client"; import { apiClient } from "@/lib/api-client";
interface ApiKey { interface ApiKey {
id: string; id: string;
@@ -93,7 +94,7 @@ const PERMISSION_OPTIONS = [
{ value: "llm:embeddings", label: "LLM Embeddings" }, { value: "llm:embeddings", label: "LLM Embeddings" },
]; ];
export default function ApiKeysPage() { function ApiKeysPageContent() {
const { toast } = useToast(); const { toast } = useToast();
const searchParams = useSearchParams(); const searchParams = useSearchParams();
const [apiKeys, setApiKeys] = useState<ApiKey[]>([]); const [apiKeys, setApiKeys] = useState<ApiKey[]>([]);
@@ -906,3 +907,11 @@ export default function ApiKeysPage() {
</div> </div>
); );
} }
export default function ApiKeysPage() {
return (
<Suspense fallback={<div className="container mx-auto p-6">Loading...</div>}>
<ApiKeysPageContent />
</Suspense>
);
}

View File

@@ -1,7 +1,7 @@
"use client"; "use client";
import { useState, useEffect } from "react"; import { useState, useEffect } from "react";
import { downloadFile } from "../lib/file-download"; import { downloadFile } from "@/lib/file-download";
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
import { Button } from "@/components/ui/button"; import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input"; import { Input } from "@/components/ui/input";
@@ -27,7 +27,7 @@ import {
ChevronRight ChevronRight
} from "lucide-react"; } from "lucide-react";
import { useToast } from "@/hooks/use-toast"; import { useToast } from "@/hooks/use-toast";
import { apiClient } from "../lib/api-client"; import { apiClient } from "@/lib/api-client";
import { config } from "@/lib/config"; import { config } from "@/lib/config";
interface AuditLog { interface AuditLog {

View File

@@ -34,7 +34,7 @@ import {
Clock Clock
} from "lucide-react"; } from "lucide-react";
import { useToast } from "@/hooks/use-toast"; import { useToast } from "@/hooks/use-toast";
import { apiClient } from "../lib/api-client"; import { apiClient } from "@/lib/api-client";
interface Budget { interface Budget {
id: string; id: string;

View File

@@ -5,7 +5,7 @@ import { useState, useEffect } from "react"
import { ProtectedRoute } from "@/components/auth/ProtectedRoute" import { ProtectedRoute } from "@/components/auth/ProtectedRoute"
import { useToast } from "@/hooks/use-toast" import { useToast } from "@/hooks/use-toast"
import { config } from "@/lib/config" import { config } from "@/lib/config"
import { apiClient } from "../lib/api-client" import { apiClient } from "@/lib/api-client"
// Force dynamic rendering for authentication // Force dynamic rendering for authentication
export const dynamic = 'force-dynamic' export const dynamic = 'force-dynamic'

View File

@@ -25,7 +25,7 @@ import {
AlertTriangle AlertTriangle
} from 'lucide-react' } from 'lucide-react'
import { useToast } from '@/hooks/use-toast' import { useToast } from '@/hooks/use-toast'
import { apiClient } from '../lib/api-client' import { apiClient } from '@/lib/api-client'
import { ProtectedRoute } from '@/components/auth/ProtectedRoute' import { ProtectedRoute } from '@/components/auth/ProtectedRoute'
import { useRouter } from 'next/navigation' import { useRouter } from 'next/navigation'

View File

@@ -29,7 +29,7 @@ import {
} from '@/components/ui/alert-dialog' } from '@/components/ui/alert-dialog'
import { Edit3, RotateCcw, Loader2, Save, AlertTriangle, Plus, Sparkles } from 'lucide-react' import { Edit3, RotateCcw, Loader2, Save, AlertTriangle, Plus, Sparkles } from 'lucide-react'
import toast from 'react-hot-toast' import toast from 'react-hot-toast'
import { apiClient } from '../lib/api-client' import { apiClient } from '@/lib/api-client'
import { config } from '@/lib/config' import { config } from '@/lib/config'
import { useAuth } from '@/contexts/AuthContext' import { useAuth } from '@/contexts/AuthContext'

View File

@@ -13,7 +13,7 @@ import { DocumentUpload } from "@/components/rag/document-upload"
import { DocumentBrowser } from "@/components/rag/document-browser" import { DocumentBrowser } from "@/components/rag/document-browser"
import { useAuth } from "@/contexts/AuthContext" import { useAuth } from "@/contexts/AuthContext"
import { ProtectedRoute } from '@/components/auth/ProtectedRoute' import { ProtectedRoute } from '@/components/auth/ProtectedRoute'
import { apiClient } from '../lib/api-client' import { apiClient } from '@/lib/api-client'
interface Collection { interface Collection {
id: string id: string

View File

@@ -10,7 +10,7 @@ import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/com
import { Alert, AlertDescription } from "@/components/ui/alert"; import { Alert, AlertDescription } from "@/components/ui/alert";
import { Checkbox } from "@/components/ui/checkbox"; import { Checkbox } from "@/components/ui/checkbox";
import { useToast } from "@/hooks/use-toast"; import { useToast } from "@/hooks/use-toast";
import { apiClient } from "../lib/api-client"; import { apiClient } from "@/lib/api-client";
interface RegisterFormData { interface RegisterFormData {
username: string; username: string;

View File

@@ -31,7 +31,7 @@ import {
Play Play
} from "lucide-react"; } from "lucide-react";
import { useToast } from "@/hooks/use-toast"; import { useToast } from "@/hooks/use-toast";
import { apiClient } from "../lib/api-client"; import { apiClient } from "@/lib/api-client";
import { useModules, triggerModuleRefresh } from '@/contexts/ModulesContext'; import { useModules, triggerModuleRefresh } from '@/contexts/ModulesContext';
import { Badge } from '@/components/ui/badge'; import { Badge } from '@/components/ui/badge';

View File

@@ -4,7 +4,7 @@ import { useAuth } from "@/contexts/AuthContext"
import { Button } from "@/components/ui/button" import { Button } from "@/components/ui/button"
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card" import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"
import { useState } from "react" import { useState } from "react"
import { apiClient } from "../lib/api-client" import { apiClient } from "@/lib/api-client"
import { tokenManager } from "@/lib/token-manager" import { tokenManager } from "@/lib/token-manager"
export default function TestAuthPage() { export default function TestAuthPage() {