From 7ae7c435b1b3ec3f821a6ca6fcb0f997a3f1ba21 Mon Sep 17 00:00:00 2001 From: yodem Date: Tue, 13 Jan 2026 15:30:58 +0200 Subject: [PATCH 1/2] feat(config): add sync options for PostgreSQL and MongoDB production data This commit introduces new configuration options for syncing production data from PostgreSQL and MongoDB in the values.yaml file. Additionally, it updates the local-settings-file.yaml to use an environment variable for the PostgreSQL database name, enhancing flexibility in configuration management. --- .../sefaria/templates/configmap/local-settings-file.yaml | 2 +- helm-chart/sefaria/values.yaml | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/helm-chart/sefaria/templates/configmap/local-settings-file.yaml b/helm-chart/sefaria/templates/configmap/local-settings-file.yaml index 0e244a44c3..1e2185ace9 100644 --- a/helm-chart/sefaria/templates/configmap/local-settings-file.yaml +++ b/helm-chart/sefaria/templates/configmap/local-settings-file.yaml @@ -66,7 +66,7 @@ data: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', - 'NAME': 'sefaria_auth', + 'NAME': os.getenv("DATABASES_NAME", 'sefaria_auth'), 'USER': os.getenv("DATABASES_USER"), 'PASSWORD': os.getenv("DATABASES_PASSWORD"), 'HOST': os.getenv("DATABASES_HOST"), diff --git a/helm-chart/sefaria/values.yaml b/helm-chart/sefaria/values.yaml index d0e3edc96d..e9e3aa7e0f 100644 --- a/helm-chart/sefaria/values.yaml +++ b/helm-chart/sefaria/values.yaml @@ -403,12 +403,17 @@ cronJobs: enabled: false weeklyEmailNotifications: enabled: false + syncPostgresProductionData: + enabled: false + syncMongoProductionData: + enabled: false localSettings: DEBUG: true DOMAIN_LANGUAGE: {} # https://www.sefaria.org: english # https://www.sefaria.org.il: hebrew + DATABASES_NAME: "sefaria_auth" # PostgreSQL database name for Django (can be overridden per environment) APSCHEDULER_NAME: "apscheduler-{{ .Values.deployEnv }}" USE_CLOUDFLARE: false FRONT_END_URL: "http://www.sefaria.org" # Use "http://${ENV_NAME}.cauldron.sefaria.org" in cauldrons From ad32d58b506d28db172b08653eac147351437f9c Mon Sep 17 00:00:00 2001 From: yodem Date: Tue, 13 Jan 2026 15:52:43 +0200 Subject: [PATCH 2/2] fix(config): update database name in local settings This commit removes the DATABASES_NAME entry from values.yaml and updates the local-settings-file.yaml to set the PostgreSQL database name to 'load-sheets' directly. This change simplifies the configuration by eliminating the reliance on an environment variable for the database name. --- helm-chart/sefaria/templates/configmap/local-settings-file.yaml | 2 +- helm-chart/sefaria/values.yaml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/helm-chart/sefaria/templates/configmap/local-settings-file.yaml b/helm-chart/sefaria/templates/configmap/local-settings-file.yaml index 1e2185ace9..55630ecff0 100644 --- a/helm-chart/sefaria/templates/configmap/local-settings-file.yaml +++ b/helm-chart/sefaria/templates/configmap/local-settings-file.yaml @@ -66,7 +66,7 @@ data: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', - 'NAME': os.getenv("DATABASES_NAME", 'sefaria_auth'), + 'NAME': 'load-sheets', 'USER': os.getenv("DATABASES_USER"), 'PASSWORD': os.getenv("DATABASES_PASSWORD"), 'HOST': os.getenv("DATABASES_HOST"), diff --git a/helm-chart/sefaria/values.yaml b/helm-chart/sefaria/values.yaml index e9e3aa7e0f..3bc2080aff 100644 --- a/helm-chart/sefaria/values.yaml +++ b/helm-chart/sefaria/values.yaml @@ -413,7 +413,6 @@ localSettings: DOMAIN_LANGUAGE: {} # https://www.sefaria.org: english # https://www.sefaria.org.il: hebrew - DATABASES_NAME: "sefaria_auth" # PostgreSQL database name for Django (can be overridden per environment) APSCHEDULER_NAME: "apscheduler-{{ .Values.deployEnv }}" USE_CLOUDFLARE: false FRONT_END_URL: "http://www.sefaria.org" # Use "http://${ENV_NAME}.cauldron.sefaria.org" in cauldrons