This document details the environment variables used in the application, as defined in config/default.py. These variables control infrastructure settings, model versions, storage locations, and feature configurations.
Quick Start: A dotenv.template file is provided in the root directory. To set up your local environment, copy this file to .env and populate the values:
These variables define the fundamental operating context of the application.
Variable
Default
Description
PROJECT_ID
None (Required)
The Google Cloud Project ID where resources (Vertex AI, Firestore, Storage) are located.
LOCATION
us-central1
The default GCP region for most services (Vertex AI, etc.).
APP_ENV
"" (Empty)
Defines the environment name (e.g., dev, godemos). This is used as a metadata tag on the Config page.
GMCS_OVERRIDE_PATH
None
(Development Only) An absolute path to a directory containing configuration overrides. If a file exists in this path (e.g., config/about_content.json), the app will prioritize it over the local version.
API_BASE_URL
http://localhost:{PORT}
The base URL for the application’s backend APIs.
PORT
8080
The port the application server listens on.
SERVICE_ACCOUNT_EMAIL
None
The email of the service account used for authentication, if applicable.
GA_MEASUREMENT_ID
None
Google Analytics Measurement ID for tracking user interactions.
When deploying this application using Terraform (via main.tf), not all environment variables are exposed for configuration. The Terraform setup manages a specific subset of variables, primarily those related to infrastructure and core model IDs.
These variables are exposed in variables.tf and directly map to environment variables in the Cloud Run service. You can customize these by setting the corresponding Terraform variable during deployment.
These variables are computed within main.tf based on the resources Terraform creates (e.g., bucket names, service account emails). You generally cannot change these via variables.tf as they ensure the application correctly connects to the provisioned infrastructure.
App Env Var
Source in main.tf
Value Logic
GENMEDIA_BUCKET
local.asset_bucket_name
creative-studio-{project_id}-assets
VIDEO_BUCKET
local.asset_bucket_name
Same as above
MEDIA_BUCKET
local.asset_bucket_name
Same as above
IMAGE_BUCKET
local.asset_bucket_name
Same as above
GCS_ASSETS_BUCKET
local.asset_bucket_name
Same as above
GENMEDIA_FIREBASE_DB
Resource Attribute
Name of the created Firestore DB
SERVICE_ACCOUNT_EMAIL
Resource Attribute
Email of the created Service Account
LYRIA_PROJECT_ID
var.project_id
Forces Lyria to use the main project ID
3. Variables NOT Set by Terraform (Using Python Defaults)
The following variables are not explicitly set in the main.tf configuration. This means the application will use the default values defined in config/default.py when deployed via Terraform.