Skip to content

Commit

Permalink
Merge pull request #727 from panoratech/kill-rag
Browse files Browse the repository at this point in the history
fix: Killed RAG feature
  • Loading branch information
rflihxyz authored Nov 21, 2024
2 parents 5d6a96c + 22d7418 commit b22f563
Show file tree
Hide file tree
Showing 33 changed files with 688 additions and 2,900 deletions.
61 changes: 61 additions & 0 deletions apps/webapp/Dockerfile.slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
FROM node:20-alpine AS base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN apk add --no-cache libc6-compat && \
corepack enable

WORKDIR /app

# Install Turbo
RUN pnpm add -g turbo@1.13.4

# Copy necessary files for turbo prune
COPY . .

# Prune the workspace
RUN turbo prune --scope=webapp --docker

# Installer stage
FROM base AS installer
WORKDIR /app

# Copy pruned files
COPY --from=base /app/out/json/ .
COPY --from=base /app/out/pnpm-lock.yaml ./pnpm-lock.yaml
COPY --from=base /app/out/full/ .

# Install dependencies
RUN pnpm install --shamefully-hoist

# Build shared package first
RUN cd packages/shared && pnpm run build

# Build the webapp
RUN pnpm run build --filter=webapp...

# Runner stage
FROM node:20-alpine AS runner
WORKDIR /app

# Don't run production as root
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs

# Copy necessary files
COPY --from=installer /app/apps/webapp/.next/standalone ./
COPY --from=installer /app/apps/webapp/.next/static ./apps/webapp/.next/static
COPY --from=installer /app/apps/webapp/public ./apps/webapp/public

# Copy package.json files
COPY --from=installer /app/apps/webapp/package.json ./package.json

# Install only production dependencies

USER nextjs

ENV NODE_ENV=production
ENV PORT=8090

EXPOSE 8090

CMD ["node", "server.js"]
8 changes: 7 additions & 1 deletion apps/webapp/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
/** @type {import('next').NextConfig} */
import path from 'path';
import { fileURLToPath } from 'url';

const __dirname = path.dirname(fileURLToPath(import.meta.url));

const nextConfig = {
output: 'standalone',
outputFileTracingRoot: path.join(__dirname, '../../'),
async redirects() {
return [
{
Expand All @@ -12,4 +18,4 @@ const nextConfig = {
}
};

export default nextConfig;
export default nextConfig;
5 changes: 0 additions & 5 deletions apps/webapp/src/app/(Dashboard)/configuration/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import useUpdatePullFrequency from "@/hooks/create/useCreatePullFrequency";
import { toast } from "sonner";
import { useQueryClient } from "@tanstack/react-query";
import { Loader2 } from "lucide-react";
import RAGSettingsPage from "@/components/Configuration/RAGSettings/RAGSettingsPage";

const frequencyOptions = [
{ label: '5 min', value: 300 },
Expand Down Expand Up @@ -185,7 +184,6 @@ export default function Page() {
<TabsTrigger value="pull-frequency">
Sync Frequency
</TabsTrigger>
<TabsTrigger value="rag-settings">RAG Settings</TabsTrigger>
<TabsTrigger value="catalog">
Manage Catalog Widget
</TabsTrigger>
Expand Down Expand Up @@ -360,9 +358,6 @@ export default function Page() {
</div>
</TabsContent>

<TabsContent value="rag-settings" className="space-y-4">
<RAGSettingsPage />
</TabsContent>

<TabsContent value="custom" className="space-y-4">
<CustomConnectorPage />
Expand Down
Loading

0 comments on commit b22f563

Please sign in to comment.