Skip to main content

Deploy a Databricks app

After you create and develop your Databricks app, you’re ready to deploy it. Deployment makes the app accessible in the Databricks workspace and runs it using the settings defined in your project files.

note

If you create an app from a template, Databricks deploys it automatically when you first create it. However, you can still re-deploy it later after you make changes. See Create a Databricks app from a template.

Prepare for deployment

Before you deploy your app, verify that your project includes the necessary components:

  • Main script - Your entry point file, such as app.py.
  • Optional app.yaml file - If your app requires a custom command or environment variables, include an app.yaml file to configure execution. See Configure Databricks app execution with app.yaml.
  • Dependencies - Make sure all dependencies are available. This could include:
  • Secrets or environment values - If you use the env section in app.yaml, verify that the referenced secrets or external sources are correctly configured and accessible. See Add resources to a Databricks app.

In addition, make sure the app service principal has access to the source code folder.

Deploy the app

To deploy an app from the Databricks UI:

  1. Upload the app files to your Databricks workspace. For instructions, see Import a file.
  2. Click compute icon Compute in the sidebar.
  3. Go to the Apps tab and click the link to your app in the Name column.
  4. Click Deploy and select the folder in your workspace where you uploaded the app files.
  5. Click Select, then Deploy.
  6. Review the configuration and click Deploy.

Once deployed, Databricks starts your app based on the defined command in your app.yaml file or defaults to running python app.py.

Post-deployment behavior

After deployment, the app runs in a managed environment. To view the deployment status, go to the overview page for the app.

View the app details page after app deployment

To view the deployed app's output, click the app link.

Go to the Logs tab for debugging and runtime monitoring. See View logs for your Databricks app.

Update or redeploy the app

You might want to update or re-deploy your app if you made changes to the source code, updated the app.yaml file, or need to deploy from a different source code path. Re-deploying applies your latest updates without needing to recreate the app from scratch.

To make changes to a deployed app:

  1. Update your app code or app.yaml configuration.
  2. Return to the Apps page in the Databricks workspace.
  3. Select your app and choose Deploy again. If the source code path changed, click the arrow next to Deploy and select Deploy using different source code path

Troubleshoot deployment issues

If your app fails to deploy or doesn’t run as expected, try the following troubleshooting steps:

  • Check logs - View error messages or runtime output in the logs panel.
  • Validate app.yaml - Make sure the syntax is correct and supported settings are used.
  • Verify secrets and environment variables - Make sure all references in the env section resolve properly.
  • Confirm dependencies - Make sure all required packages are included or installed.