Merge pull request #759 from enriquecatala/fix-env-security

Exclude .env from Docker Image & Mount as Volume in docker-compose.yml
This commit is contained in:
zrguo
2025-02-14 00:50:51 +08:00
committed by GitHub
3 changed files with 2 additions and 1 deletions

1
.dockerignore Normal file
View File

@@ -0,0 +1 @@
.env

View File

@@ -33,7 +33,6 @@ WORKDIR /app
COPY --from=builder /root/.local /root/.local COPY --from=builder /root/.local /root/.local
COPY ./lightrag ./lightrag COPY ./lightrag ./lightrag
COPY setup.py . COPY setup.py .
COPY .env .
RUN pip install . RUN pip install .
# Make sure scripts in .local are usable # Make sure scripts in .local are usable

View File

@@ -8,6 +8,7 @@ services:
volumes: volumes:
- ./data/rag_storage:/app/data/rag_storage - ./data/rag_storage:/app/data/rag_storage
- ./data/inputs:/app/data/inputs - ./data/inputs:/app/data/inputs
- .env:/app/.env
env_file: env_file:
- .env - .env
environment: environment: