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 . .
|
||||
|
||||
# Environment variables for build
|
||||
ENV NEXT_TELEMETRY_DISABLED 1
|
||||
ENV NODE_ENV production
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
ENV NODE_ENV=production
|
||||
|
||||
# Build the application
|
||||
RUN \
|
||||
@@ -38,8 +38,8 @@ RUN \
|
||||
FROM base AS runner
|
||||
WORKDIR /app
|
||||
|
||||
ENV NODE_ENV production
|
||||
ENV NEXT_TELEMETRY_DISABLED 1
|
||||
ENV NODE_ENV=production
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
|
||||
# Create nextjs user
|
||||
RUN addgroup --system --gid 1001 nodejs
|
||||
@@ -61,8 +61,8 @@ USER nextjs
|
||||
# Expose port
|
||||
EXPOSE 3000
|
||||
|
||||
ENV PORT 3000
|
||||
ENV HOSTNAME "0.0.0.0"
|
||||
ENV PORT=3000
|
||||
ENV HOSTNAME=0.0.0.0
|
||||
|
||||
# Start the application (standalone)
|
||||
CMD ["node", "server.js"]
|
||||
CMD ["node", "server.js"]
|
||||
|
||||
@@ -9,10 +9,8 @@ const nextConfig = {
|
||||
typescript: {
|
||||
ignoreBuildErrors: true,
|
||||
},
|
||||
experimental: {
|
||||
// Enable standalone output for better Docker compatibility
|
||||
outputStandalone: true,
|
||||
},
|
||||
// Enable standalone output for better Docker compatibility
|
||||
output: 'standalone',
|
||||
webpack: (config, { isServer, dev }) => {
|
||||
config.resolve.alias = {
|
||||
...config.resolve.alias,
|
||||
@@ -53,4 +51,4 @@ const nextConfig = {
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = nextConfig;
|
||||
module.exports = nextConfig;
|
||||
|
||||
@@ -18,7 +18,7 @@ import {
|
||||
CheckCircle,
|
||||
XCircle
|
||||
} from "lucide-react";
|
||||
import { apiClient } from "../lib/api-client";
|
||||
import { apiClient } from "@/lib/api-client";
|
||||
|
||||
interface SystemStats {
|
||||
total_users: number;
|
||||
@@ -358,4 +358,4 @@ export default function AdminPage() {
|
||||
</Tabs>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ import {
|
||||
RefreshCw
|
||||
} from 'lucide-react';
|
||||
import { ProtectedRoute } from '@/components/auth/ProtectedRoute'
|
||||
import { apiClient } from '../lib/api-client'
|
||||
import { apiClient } from '@/lib/api-client'
|
||||
|
||||
interface AnalyticsData {
|
||||
overview: {
|
||||
@@ -399,4 +399,4 @@ function AnalyticsPageContent() {
|
||||
</Tabs>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { useState, useEffect } from "react";
|
||||
import { useState, useEffect, Suspense } from "react";
|
||||
export const dynamic = 'force-dynamic'
|
||||
import { useSearchParams } from "next/navigation";
|
||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
|
||||
import { Button } from "@/components/ui/button";
|
||||
@@ -36,7 +37,7 @@ import {
|
||||
Bot
|
||||
} from "lucide-react";
|
||||
import { useToast } from "@/hooks/use-toast";
|
||||
import { apiClient } from "../lib/api-client";
|
||||
import { apiClient } from "@/lib/api-client";
|
||||
|
||||
interface ApiKey {
|
||||
id: string;
|
||||
@@ -93,7 +94,7 @@ const PERMISSION_OPTIONS = [
|
||||
{ value: "llm:embeddings", label: "LLM Embeddings" },
|
||||
];
|
||||
|
||||
export default function ApiKeysPage() {
|
||||
function ApiKeysPageContent() {
|
||||
const { toast } = useToast();
|
||||
const searchParams = useSearchParams();
|
||||
const [apiKeys, setApiKeys] = useState<ApiKey[]>([]);
|
||||
@@ -905,4 +906,12 @@ export default function ApiKeysPage() {
|
||||
</Dialog>
|
||||
</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";
|
||||
|
||||
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 { Button } from "@/components/ui/button";
|
||||
import { Input } from "@/components/ui/input";
|
||||
@@ -27,7 +27,7 @@ import {
|
||||
ChevronRight
|
||||
} from "lucide-react";
|
||||
import { useToast } from "@/hooks/use-toast";
|
||||
import { apiClient } from "../lib/api-client";
|
||||
import { apiClient } from "@/lib/api-client";
|
||||
import { config } from "@/lib/config";
|
||||
|
||||
interface AuditLog {
|
||||
@@ -544,4 +544,4 @@ export default function AuditPage() {
|
||||
</Card>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ import {
|
||||
Clock
|
||||
} from "lucide-react";
|
||||
import { useToast } from "@/hooks/use-toast";
|
||||
import { apiClient } from "../lib/api-client";
|
||||
import { apiClient } from "@/lib/api-client";
|
||||
|
||||
interface Budget {
|
||||
id: string;
|
||||
@@ -608,4 +608,4 @@ export default function BudgetsPage() {
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import { useState, useEffect } from "react"
|
||||
import { ProtectedRoute } from "@/components/auth/ProtectedRoute"
|
||||
import { useToast } from "@/hooks/use-toast"
|
||||
import { config } from "@/lib/config"
|
||||
import { apiClient } from "../lib/api-client"
|
||||
import { apiClient } from "@/lib/api-client"
|
||||
|
||||
// Force dynamic rendering for authentication
|
||||
export const dynamic = 'force-dynamic'
|
||||
@@ -476,4 +476,4 @@ function DashboardContent() {
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ import {
|
||||
AlertTriangle
|
||||
} from 'lucide-react'
|
||||
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 { useRouter } from 'next/navigation'
|
||||
|
||||
@@ -468,4 +468,4 @@ function LLMPageContent() {
|
||||
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ import {
|
||||
} from '@/components/ui/alert-dialog'
|
||||
import { Edit3, RotateCcw, Loader2, Save, AlertTriangle, Plus, Sparkles } from 'lucide-react'
|
||||
import toast from 'react-hot-toast'
|
||||
import { apiClient } from '../lib/api-client'
|
||||
import { apiClient } from '@/lib/api-client'
|
||||
import { config } from '@/lib/config'
|
||||
import { useAuth } from '@/contexts/AuthContext'
|
||||
|
||||
@@ -725,4 +725,4 @@ export default function PromptTemplatesPage() {
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import { DocumentUpload } from "@/components/rag/document-upload"
|
||||
import { DocumentBrowser } from "@/components/rag/document-browser"
|
||||
import { useAuth } from "@/contexts/AuthContext"
|
||||
import { ProtectedRoute } from '@/components/auth/ProtectedRoute'
|
||||
import { apiClient } from '../lib/api-client'
|
||||
import { apiClient } from '@/lib/api-client'
|
||||
|
||||
interface Collection {
|
||||
id: string
|
||||
@@ -237,4 +237,4 @@ function RAGPageContent() {
|
||||
</Tabs>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/com
|
||||
import { Alert, AlertDescription } from "@/components/ui/alert";
|
||||
import { Checkbox } from "@/components/ui/checkbox";
|
||||
import { useToast } from "@/hooks/use-toast";
|
||||
import { apiClient } from "../lib/api-client";
|
||||
import { apiClient } from "@/lib/api-client";
|
||||
|
||||
interface RegisterFormData {
|
||||
username: string;
|
||||
@@ -288,4 +288,4 @@ export default function RegisterPage() {
|
||||
</Card>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ import {
|
||||
Play
|
||||
} from "lucide-react";
|
||||
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 { Badge } from '@/components/ui/badge';
|
||||
|
||||
@@ -1115,4 +1115,4 @@ export default function SettingsPage() {
|
||||
<SettingsPageContent />
|
||||
</ProtectedRoute>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import { useAuth } from "@/contexts/AuthContext"
|
||||
import { Button } from "@/components/ui/button"
|
||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"
|
||||
import { useState } from "react"
|
||||
import { apiClient } from "../lib/api-client"
|
||||
import { apiClient } from "@/lib/api-client"
|
||||
import { tokenManager } from "@/lib/token-manager"
|
||||
|
||||
export default function TestAuthPage() {
|
||||
@@ -136,4 +136,4 @@ Authenticated: ${tokenManager.isAuthenticated()}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user