mirror of
https://github.com/aljazceru/enclava.git
synced 2025-12-17 07:24:34 +01:00
build fix
This commit is contained in:
@@ -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"]
|
||||||
|
|||||||
@@ -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
|
output: 'standalone',
|
||||||
outputStandalone: true,
|
|
||||||
},
|
|
||||||
webpack: (config, { isServer, dev }) => {
|
webpack: (config, { isServer, dev }) => {
|
||||||
config.resolve.alias = {
|
config.resolve.alias = {
|
||||||
...config.resolve.alias,
|
...config.resolve.alias,
|
||||||
@@ -53,4 +51,4 @@ const nextConfig = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = nextConfig;
|
module.exports = nextConfig;
|
||||||
|
|||||||
@@ -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;
|
||||||
@@ -358,4 +358,4 @@ export default function AdminPage() {
|
|||||||
</Tabs>
|
</Tabs>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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: {
|
||||||
@@ -399,4 +399,4 @@ function AnalyticsPageContent() {
|
|||||||
</Tabs>
|
</Tabs>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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[]>([]);
|
||||||
@@ -905,4 +906,12 @@ export default function ApiKeysPage() {
|
|||||||
</Dialog>
|
</Dialog>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default function ApiKeysPage() {
|
||||||
|
return (
|
||||||
|
<Suspense fallback={<div className="container mx-auto p-6">Loading...</div>}>
|
||||||
|
<ApiKeysPageContent />
|
||||||
|
</Suspense>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|||||||
@@ -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 {
|
||||||
@@ -544,4 +544,4 @@ export default function AuditPage() {
|
|||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
@@ -608,4 +608,4 @@ export default function BudgetsPage() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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'
|
||||||
@@ -476,4 +476,4 @@ function DashboardContent() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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'
|
||||||
|
|
||||||
@@ -468,4 +468,4 @@ function LLMPageContent() {
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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'
|
||||||
|
|
||||||
@@ -725,4 +725,4 @@ export default function PromptTemplatesPage() {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -237,4 +237,4 @@ function RAGPageContent() {
|
|||||||
</Tabs>
|
</Tabs>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
@@ -288,4 +288,4 @@ export default function RegisterPage() {
|
|||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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';
|
||||||
|
|
||||||
@@ -1115,4 +1115,4 @@ export default function SettingsPage() {
|
|||||||
<SettingsPageContent />
|
<SettingsPageContent />
|
||||||
</ProtectedRoute>
|
</ProtectedRoute>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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() {
|
||||||
@@ -136,4 +136,4 @@ Authenticated: ${tokenManager.isAuthenticated()}
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user