Genbase

Environment Variable Configuration

Reference guide for environment variables used by Genbase Engine and Studio.

Environment Variable Configuration

Genbase uses environment variables extensively for configuration. These variables control database connections, API keys for external services, authentication settings, and operational parameters.

Configuration Files

Environment variables are typically managed using .env files:

  • Root .env: Located at the repository root. Primarily used by Docker Compose to set environment variables for the containers.
  • engine/.env: Located in the engine/ directory. Read directly by the Engine application (FastAPI). Contains database URLs, API keys, auth secrets, etc.
  • studio/.env: Located in the studio/ directory. Primarily used for build-time arguments for the Studio Docker image (like VITE_ENGINE_URL) and potentially runtime configuration read by the frontend application.

Priority and Overrides

When using Docker Compose, variables set directly in the docker-compose.yml environment: section or passed via the command line might override values from the .env files. For local development (run-local.sh), the .env files in the respective service directories (engine/, studio/) are typically used.

Variable Reference

Here is a breakdown of common environment variables used by Genbase:

Configuration Priority

  1. Environment Variables: Variables set directly in the runtime environment (e.g., via export or Docker Compose environment: section) usually take the highest priority.
  2. .env Files: Variables loaded from .env files are typically loaded next.
  3. Default Values: Code defaults are used if no value is provided via environment or .env.

Always refer to the .env.template files in the repository root, engine/, and studio/ directories for the most up-to-date list of expected variables.

On this page