This is an automated email from the ASF dual-hosted git repository.

jiadongb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/texera.git


The following commit(s) were added to refs/heads/main by this push:
     new b62632db52 feat(config): allow default.conf to be set using 
environment variables (#3757)
b62632db52 is described below

commit b62632db52362d8d9b852ea1a2aec516631f583b
Author: Jiadong Bai <[email protected]>
AuthorDate: Wed Oct 1 10:18:47 2025 -0700

    feat(config): allow default.conf to be set using environment variables 
(#3757)
    
    ## Summary
    This PR allows configuration values in `default.conf` to be set using
    environment variables, enabling better deployment flexibility across
    different environments.
    
    ## Changes
    - Modified configuration loading to check environment variables first
    before falling back to default values
    - Supports all major configuration parameters through environment
    variables
    - Maintains backward compatibility with existing configurations
    
    ## Motivation
    Fixes #3758
    
    Currently, deploying Texera in different environments requires modifying
    configuration files. This change allows configuration to be injected at
    runtime through environment variables, following cloud-native best
    practices.
    
    ## Benefits
    - **Environment-specific configs**: Easy switching between
    dev/staging/prod configurations
    - **Container-friendly**: Better Docker and Kubernetes support following
    12-factor app principles
    - **Security**: Sensitive values can be injected at runtime without
    being committed to code
    - **CI/CD integration**: Simplified deployment pipelines
    
    ## Test Plan
    - [ ] Verify default configuration values work when no env vars are set
    - [ ] Test environment variable override for key configurations
    - [ ] Confirm all services properly read environment variables
    - [ ] Test with Docker deployment using env vars
    - [ ] Validate single-node deployment with custom configurations
    
    ## Example Usage
    ```bash
    export STORAGE_LAKEFS_AUTH_USERNAME="custom-username"
    export STORAGE_LAKEFS_AUTH_PASSWORD="custom-password"
    export STORAGE_JDBC_URL="jdbc:postgresql://prod-db:5432/texera"
    ```
    
    ## Related Issues
    Closes #3758
    
    Signed-off-by: Jiadong Bai <[email protected]>
---
 core/config/src/main/resources/default.conf | 30 +++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/core/config/src/main/resources/default.conf 
b/core/config/src/main/resources/default.conf
index 5df68ecbfc..0ce2a2e38b 100644
--- a/core/config/src/main/resources/default.conf
+++ b/core/config/src/main/resources/default.conf
@@ -22,42 +22,72 @@
 config-service {
   # Setting to true resets all site settings in the database to the defaults 
defined in this file.
   always-reset-configurations-to-default-values = false
+  always-reset-configurations-to-default-values = 
${?CONFIG_SERVICE_ALWAYS_RESET_CONFIGURATIONS_TO_DEFAULT_VALUES}
 }
 
 gui {
   logo {
     logo = "assets/logos/logo.png"
+    logo = ${?GUI_LOGO_LOGO}
+
     mini_logo = "assets/logos/full_logo_small.png"
+    mini_logo = ${?GUI_LOGO_MINI_LOGO}
+
     favicon = "assets/logos/favicon-32x32.png"
+    favicon = ${?GUI_LOGO_FAVICON}
   }
 
   tabs {
     # config for hub tabs
     hub_enabled = true
+    hub_enabled = ${?GUI_TABS_HUB_ENABLED}
+
     home_enabled = true
+    home_enabled = ${?GUI_TABS_HOME_ENABLED}
+
     workflow_enabled = true
+    workflow_enabled = ${?GUI_TABS_WORKFLOW_ENABLED}
+
     dataset_enabled = true
+    dataset_enabled = ${?GUI_TABS_DATASET_ENABLED}
 
     # config for your work tabs
     your_work_enabled = true
+    your_work_enabled = ${?GUI_TABS_YOUR_WORK_ENABLED}
+
     projects_enabled = false
+    projects_enabled = ${?GUI_TABS_PROJECTS_ENABLED}
+
     workflows_enabled = true
+    workflows_enabled = ${?GUI_TABS_WORKFLOWS_ENABLED}
+
     datasets_enabled = true
+    datasets_enabled = ${?GUI_TABS_DATASETS_ENABLED}
+
     quota_enabled = true
+    quota_enabled = ${?GUI_TABS_QUOTA_ENABLED}
+
     forum_enabled = false
+    forum_enabled = ${?GUI_TABS_FORUM_ENABLED}
 
     # config for about tab
     about_enabled = true
+    about_enabled = ${?GUI_TABS_ABOUT_ENABLED}
   }
 }
 
 dataset {
   single_file_upload_max_size_mib = 20
+  single_file_upload_max_size_mib = ${?DATASET_SINGLE_FILE_UPLOAD_MAX_SIZE_MIB}
+
   max_number_of_concurrent_uploading_file = 3
+  max_number_of_concurrent_uploading_file = 
${?MAX_NUMBER_OF_CONCURRENT_UPLOADING_FILE}
 
   # The maximum number of file chunks that can be held in the memory
   max_number_of_concurrent_uploading_file_chunks = 10
+  max_number_of_concurrent_uploading_file_chunks = 
${?DATASET_MAX_NUMBER_OF_CONCURRENT_UPLOADING_FILE_CHUNKS}
 
   # the size of each chunk during the multipart upload of file
   multipart_upload_chunk_size_mib = 50
+  multipart_upload_chunk_size_mib = ${?DATASET_MULTIPART_UPLOAD_CHUNK_SIZE_MIB}
 }

Reply via email to