Looking for example databricks.yml and bundle resources for deploying a FastAPI Databricks app using DABs from one environment to another. Deployment works but FastAPI redirects to localhost after deployment, though the homepage loads fine. Need reference code or repo that handles FastAPI URL routing correctly in Databricks apps using DABs.Have tried official docs and community posts but stuck on redirect issues. Any pointers, working samples, or bundle configs would be appreciated.
We are exploring three different methods for deploying applications using Databricks app bundles, as defined in the resource\app_deployment.yml file:
Basic App Deployment:
resources:
apps:
my_app:
name: "app-with-database"
source_code_path: ../app
description: "A Dash app leveraging an OLTP Database"
# Specifies resources accessible by this appDeployment with Lakebase Database Integration:
resources:
apps:
my_app:
name: "app-with-database"
source_code_path: ../app
description: "A Dash app leveraging an OLTP Database"
resources:
- name: "app-db"
description: "Lakebase database service"
database:
database_name: app-sample
instance_name: "instance-id....<>..<>"
permission: "CAN_CONNECT_AND_CREATE"Deployment Using a Job Manager App:
resources:
apps:
job_manager:
name: "job_manager"
description: "An application dedicated to managing jobs created within this app bundle"
source_code_path: ../src/app
Each method has specific configurations and purposes. We are currently seeking best practices or sample configurations for correctly deploying such apps, especially those that utilize databases or job management, within Databricks app deployment bundles. Any guidance, working examples, or resource bundles that handle these cases, particularly addressing issues like FastAPI redirecting incorrectly after deployment, would be greatly appreciated.