Skip to main content
ODAI runs on Google App Engine (Flexible Environment) using Python 3.13 with Gunicorn and Uvicorn workers. Two separate Google Cloud projects are used to isolate environments:
EnvironmentProject IDConfig file
Developmentodai-dev-5e4fdapp.yaml
Productionodai-prodprod.yaml

Prerequisites

Authenticate with the Google Cloud SDK before deploying:
gcloud auth login
gcloud auth application-default login

Configuration differences

The development configuration uses manual scaling with a single instance, keeping costs low during active development.
runtime: python
entrypoint: gunicorn -w 2 -k uvicorn.workers.UvicornWorker api:APP
env: flex

runtime_config:
  operating_system: ubuntu22
  runtime_version: "3.13"

manual_scaling:
  instances: 1
resources:
  cpu: 1
  memory_gb: 4
  disk_size_gb: 20

env_variables:
  LOCAL: "false"
Key characteristics:
  • 1 Gunicorn worker process with 2 Uvicorn workers
  • 1 fixed instance (manual scaling — no auto-scaling)
  • 1 vCPU, 4 GB RAM
  • LOCAL=false so the app reads secrets from Google Secret Manager

Deploying

Use the provided shell script to deploy to the development environment. The script runs the full test suite before deploying to catch regressions early:
./deploy_development.sh
This script executes the following steps:
gcloud config set project odai-dev
python run_tests.py --workers 8
gcloud app deploy
To deploy manually without the script:
gcloud config set project odai-dev-5e4fd
gcloud app deploy app.yaml --version=your-version-name

Secrets in deployed environments

Neither app.yaml nor prod.yaml contains API keys. Since LOCAL is set to false in both configs, the application fetches all secrets from Google Secret Manager at startup using the project’s service account. Ensure every required secret is stored in Secret Manager under the appropriate project before deploying. Secret IDs match the variable names from config.py (e.g., openai_api_key, plaid_client_id). See Environment Variables for the complete list.

Checking deployment status

# View deployed versions
gcloud app versions list

# Stream application logs
gcloud app logs tail -s default

# Open the deployed app in a browser
gcloud app browse

Build docs developers (and LLMs) love