From 9cabec1214d96b52f1b0b9c2c3ff2ae782c8665d Mon Sep 17 00:00:00 2001 From: aliamerj Date: Thu, 24 Apr 2025 13:28:51 +0300 Subject: [PATCH 1/3] add password to qdrant --- qdrant/index.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qdrant/index.ts b/qdrant/index.ts index 647539a..0256d58 100644 --- a/qdrant/index.ts +++ b/qdrant/index.ts @@ -2,8 +2,7 @@ import { QdrantClient } from "@qdrant/js-client-rest"; export const qdrant_collection_name = "documents"; -export const qdrantCLient = new QdrantClient({ url: process.env.QDRANT_DB_URL! }); - +export const qdrantCLient = new QdrantClient({ url: process.env.QDRANT_DB_URL!, apiKey: process.env.QDRANT_DB_KEY }); if (process.env.NEXT_PHASE !== 'phase-production-build') { const { collections } = await qdrantCLient.getCollections(); From 512441a1d85d0e787968e0d81365500c0eee2680 Mon Sep 17 00:00:00 2001 From: aliamerj Date: Thu, 24 Apr 2025 20:10:55 +0300 Subject: [PATCH 2/3] set up docker for render --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8e46191..db64a93 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,7 +26,8 @@ COPY docker-entrypoint.sh /usr/local/bin/ # Make sure the entrypoint script is executable RUN chmod +x /usr/local/bin/docker-entrypoint.sh -RUN npm run build +# Load environment variables from Render's secret file and run the build +RUN set -a && . /run/secrets/.env && set +a && npm run build RUN cp -r public .next/standalone/ && cp -r .next/static .next/standalone/.next/ From 88693944a2552a6b521002992953f6b44cf6bcf6 Mon Sep 17 00:00:00 2001 From: Ali Amer <76897266+aliamerj@users.noreply.github.com> Date: Thu, 24 Apr 2025 20:57:07 +0300 Subject: [PATCH 3/3] Update Dockerfile Signed-off-by: Ali Amer <76897266+aliamerj@users.noreply.github.com> --- Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index db64a93..857c2e7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,8 +26,11 @@ COPY docker-entrypoint.sh /usr/local/bin/ # Make sure the entrypoint script is executable RUN chmod +x /usr/local/bin/docker-entrypoint.sh -# Load environment variables from Render's secret file and run the build -RUN set -a && . /run/secrets/.env && set +a && npm run build +ENV OPENAI_API_KEY=openai-api-key-for-build +ENV REDIS_HOST=just-for-build-only +ENV REDIS_PORT=6379 + +RUN npm run build RUN cp -r public .next/standalone/ && cp -r .next/static .next/standalone/.next/