What you’ll do
- Set up a custom Domino environment that includes Dash
- Create a project and configure it for app publishing
- Add and run Dash sample code that works with Domino routing
- Publish and share your app using the Domino Launchpad interface
Step 1: Set up a compute environment
First, create a Domino compute environment that includes Dash:- In Domino, go to Govern > Environments > Create Environment.
- Provide a name and description.
- Select the Domino Standard Environment as the base image.
- Click Create Environment.
- To add Dash, click Edit Definition and append the following lines to the Dockerfile:
- Then, click Build and wait for the process to complete.
Step 2: Create a Project
Now you’ll create a project in Domino to hold your Dash app:- From Domino, go to Develop > Projects > Create Project.
- Name your Project and click Create.
- In the sidebar, go to Settings > Compute environment and select the environment you just built.
- Go to Code > Add File, name the file
app.py, and click Save.
Step 3: Add app code
You’ll now add the Python code for your Dash app. Domino requires a few lines of setup to handle routing correctly, but you can use any Dash app layout or logic you like. This basic app confirms that Dash is working in Domino. It renders a static Plotly chart with no data dependencies or interactivity. To make your Dash app work in Domino, set routing with Domino environment variables and serve the app from0.0.0.0 on port 8888.
- Open the
app.pyfile you created earlier. - Paste in the following code and save the file:
Step 4: Add a startup script
Domino runs your app using a startup script. Create it like this:- In the project sidebar, go to Code > Add File.
- Name the file
app.shand addpython app.pyto the file. - Click Save.
Step 5: Publish and deploy the App
Before Cloud Release 90, selecting Publish App created and deployed the App in one step. Starting with Cloud Release 90, the steps are separate: preview the App in a Workspace, publish a version, then deploy that version.1
Create the App
On your project’s Deploy > Apps & Agents page, select Create, then App in Workspace. Any workspace you already have open works too. See Create an App.
2
Preview it
In the workspace, open the App Preview tab and set the App file, Compute Environment, and Hardware Tier. Commit your code first, because preview runs the latest committed code. See Develop and test an App.
3
Publish a version
Select Publish App, then Publish as a new App. This records an immutable version and doesn’t start it.
4
Deploy the version
On the App details page, select the version and select Deploy, then set access under Access and sharing. See Publish and deploy App versions and Share an App.
Step 6: Share the App
To share your app:- Go to Deployments > Apps & Agents, and click Copy App Link.
- Open the link while signed in as a Domino user who isn’t a Project collaborator to test broad access.
- Share the URL with collaborators.
- To browse other published apps, go to Deploy > Apps in the top nav.
Next steps
- Apps in Domino gives an overview of how apps work within the Domino ecosystem.
- Create an App covers the two entry points for a new App, and why creating one no longer deploys it.
- Learn more about how apps in Domino run and what identity and permissions are used.