From 3b19c075ad6e8930d785943b24e46b2c08555c3a Mon Sep 17 00:00:00 2001 From: pablodanswer Date: Thu, 7 Nov 2024 10:17:40 -0800 Subject: [PATCH] minor improvements --- deployment/docker_compose/docker-compose.dev.yml | 4 ++++ .../docker_compose/docker-compose.prod.yml | 4 ++++ deployment/kubernetes/background-deployment.yaml | 16 +++++++++++----- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/deployment/docker_compose/docker-compose.dev.yml b/deployment/docker_compose/docker-compose.dev.yml index 34be985c01d..4f1bfb225f0 100644 --- a/deployment/docker_compose/docker-compose.dev.yml +++ b/deployment/docker_compose/docker-compose.dev.yml @@ -221,6 +221,10 @@ services: max-size: "50m" max-file: "6" # Uncomment the following lines if you need to include a custom CA certificate + # This section enables the use of a custom CA certificate + # If present, the custom CA certificate is mounted as a volume + # The container checks for its existence and updates the system's CA certificates + # This allows for secure communication with services using custom SSL certificates # Optional volume mount for CA certificate # volumes: # # Maps to the CA_CERT_PATH environment variable in the Dockerfile diff --git a/deployment/docker_compose/docker-compose.prod.yml b/deployment/docker_compose/docker-compose.prod.yml index d4ba321736e..18afe127955 100644 --- a/deployment/docker_compose/docker-compose.prod.yml +++ b/deployment/docker_compose/docker-compose.prod.yml @@ -65,6 +65,10 @@ services: max-size: "50m" max-file: "6" # Uncomment the following lines if you need to include a custom CA certificate + # This section enables the use of a custom CA certificate + # If present, the custom CA certificate is mounted as a volume + # The container checks for its existence and updates the system's CA certificates + # This allows for secure communication with services using custom SSL certificates # volumes: # # Maps to the CA_CERT_PATH environment variable in the Dockerfile # - ${CA_CERT_PATH:-./custom-ca.crt}:/etc/ssl/certs/custom-ca.crt:ro diff --git a/deployment/kubernetes/background-deployment.yaml b/deployment/kubernetes/background-deployment.yaml index 4989d889fdf..25b6f4a7f81 100644 --- a/deployment/kubernetes/background-deployment.yaml +++ b/deployment/kubernetes/background-deployment.yaml @@ -17,11 +17,13 @@ spec: image: danswer/danswer-backend:latest imagePullPolicy: IfNotPresent command: - [ - "/usr/bin/supervisord", - "-c", - "/etc/supervisor/conf.d/supervisord.conf", - ] + - "/bin/sh" + - "-c" + - | + if [ -f /etc/ssl/certs/custom-ca.crt ]; then + update-ca-certificates; + fi && + /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf env: - name: REDIS_PASSWORD valueFrom: @@ -32,6 +34,10 @@ spec: - configMapRef: name: env-configmap # Uncomment the following lines if you need to include a custom CA certificate + # This section allows for the inclusion of a custom CA certificate + # If a custom CA certificate is present, it updates the system's CA certificates + # This is useful for environments with self-signed or internal CA certificates + # The certificate is mounted as a volume and the container checks for its presence # Optional volume mount for CA certificate # volumeMounts: # - name: my-ca-cert-volume