# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.

# Public host and ports exposed by the deployment
TEXERA_HOST=http://localhost
TEXERA_PORT=8080
MINIO_PORT=9000

# Log level for all Texera services (valid values: ERROR, WARN, INFO, DEBUG)
TEXERA_SERVICE_LOG_LEVEL=INFO

# Container image configuration
# Override these to use a different registry or image version
IMAGE_REGISTRY=ghcr.io/apache
IMAGE_TAG=latest

# Admin credentials for Texera
USER_SYS_ADMIN_USERNAME=texera
USER_SYS_ADMIN_PASSWORD=texera

# Postgres root credentials
POSTGRES_USER=texera
POSTGRES_PASSWORD=password

# S3 (MinIO) credentials
STORAGE_S3_AUTH_USERNAME=texera_minio
STORAGE_S3_AUTH_PASSWORD=password

# LakeFS server configuration
LAKEFS_INSTALLATION_USER_NAME=texera-admin
LAKEFS_INSTALLATION_ACCESS_KEY_ID=AKIAIOSFOLKFSSAMPLES
LAKEFS_INSTALLATION_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
LAKEFS_BLOCKSTORE_TYPE=s3
LAKEFS_BLOCKSTORE_S3_FORCE_PATH_STYLE=true
LAKEFS_BLOCKSTORE_S3_ENDPOINT=http://texera-minio:9000
LAKEFS_AUTH_ENCRYPT_SECRET_KEY=random_string_for_lakefs
LAKEFS_LOGGING_LEVEL=INFO
LAKEFS_STATS_ENABLED=1
LAKEFS_DATABASE_TYPE=postgres
LAKEFS_DATABASE_POSTGRES_CONNECTION_STRING=postgres://texera:password@texera-postgres:5432/texera_lakefs?sslmode=disable

# Lakekeeper server configuration
LAKEKEEPER__PG_DATABASE_URL_READ=postgres://texera:password@texera-postgres:5432/texera_lakekeeper
LAKEKEEPER__PG_DATABASE_URL_WRITE=postgres://texera:password@texera-postgres:5432/texera_lakekeeper
LAKEKEEPER__PG_ENCRYPTION_KEY=texera_key
LAKEKEEPER_BASE_URI=http://texera-lakekeeper:8181

# Texera storage endpoints
STORAGE_S3_ENDPOINT=http://texera-minio:9000
STORAGE_S3_REGION=us-west-2
STORAGE_LAKEFS_ENDPOINT=http://texera-lakefs:8000/api/v1
STORAGE_JDBC_URL=jdbc:postgresql://texera-postgres:5432/texera_db?currentSchema=texera_db,public
STORAGE_JDBC_USERNAME=texera
STORAGE_JDBC_PASSWORD=password

# Iceberg catalog selector (valid values: rest, postgres)
STORAGE_ICEBERG_CATALOG_TYPE=rest

# Iceberg REST catalog client configuration
STORAGE_ICEBERG_CATALOG_REST_URI=http://texera-lakekeeper:8181/catalog
STORAGE_ICEBERG_CATALOG_REST_WAREHOUSE_NAME=texera
STORAGE_ICEBERG_CATALOG_REST_S3_BUCKET=texera-iceberg

# Postgres-backed Iceberg catalog
STORAGE_ICEBERG_CATALOG_POSTGRES_URI_WITHOUT_SCHEME=texera-postgres:5432/texera_iceberg_catalog
STORAGE_ICEBERG_CATALOG_POSTGRES_USERNAME=texera
STORAGE_ICEBERG_CATALOG_POSTGRES_PASSWORD=password

# File service endpoints
FILE_SERVICE_GET_PRESIGNED_URL_ENDPOINT=http://file-service:9092/api/dataset/presign-download
FILE_SERVICE_UPLOAD_ONE_FILE_TO_DATASET_ENDPOINT=http://file-service:9092/api/dataset/did/upload

# Toggles the texera agent panel; set false to hide it in the GUI.
GUI_WORKFLOW_WORKSPACE_COPILOT_ENABLED=true

# Litellm key and URL for internal LLM traffic
LITELLM_MASTER_KEY=sk-texera-internal-do-not-share
LITELLM_BASE_URL=http://litellm:4000

# Configurations for agent-service to connect to Texera's services
LLM_ENDPOINT=http://nginx:8080
LLM_API_KEY=dummy
TEXERA_DASHBOARD_SERVICE_ENDPOINT=http://dashboard-service:8080
WORKFLOW_COMPILING_SERVICE_ENDPOINT=http://workflow-compiling-service:9090
WORKFLOW_EXECUTION_SERVICE_ENDPOINT=http://workflow-runtime-coordinator-service:8085
