From 4d0a316717e628bd15f4a04f647fdcb4d3258189 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrique=20Catal=C3=A1?= Date: Wed, 12 Feb 2025 21:32:19 +0100 Subject: [PATCH 1/2] exclude .env file with potentionally sensitive information like LLM API KEYS --- .dockerignore | 1 + Dockerfile | 1 - docker-compose.yml | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..2eea525d --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +.env \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 8c9474de..4532ee61 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,7 +33,6 @@ WORKDIR /app COPY --from=builder /root/.local /root/.local COPY ./lightrag ./lightrag COPY setup.py . -COPY .env . RUN pip install . # Make sure scripts in .local are usable diff --git a/docker-compose.yml b/docker-compose.yml index a4713279..b5659692 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,6 +8,7 @@ services: volumes: - ./data/rag_storage:/app/data/rag_storage - ./data/inputs:/app/data/inputs + - .env:/app/.env env_file: - .env environment: From cacb429ad91850d029bf3186711329c86a94a82b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrique=20Catal=C3=A1?= Date: Thu, 13 Feb 2025 11:35:38 +0100 Subject: [PATCH 2/2] fix linting --- .dockerignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.dockerignore b/.dockerignore index 2eea525d..4c49bd78 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1 +1 @@ -.env \ No newline at end of file +.env