Domino can run apps built in a variety of popular frameworks, as long as they launch a web server on localhost:8888
. Below are minimal examples that demonstrate how to start each supported type of app. These are intended to help you get a working stub up and running quickly.
Dash (Python)
Dash is a lightweight Python framework for building interactive analytic apps with Plotly visualizations.
import dash
app = dash.Dash(__name__, routes_pathname_prefix='/')
if __name__ == '__main__':
app.run_server(port=8888, host='0.0.0.0', debug=True)
-
Make sure
dash
is installed in your environment. -
Use
routes_pathname_prefix='/'
for proper routing inside Domino.
Streamlit (Python)
Streamlit is a rapid app framework for turning Python scripts into shareable web apps with minimal code.
import streamlit as st
st.title("Minimal Streamlit App")
st.write("Hello from Domino!")
In your .sh
file, launch with:
streamlit run app.py --server.port=8888 --server.address=0.0.0.0
-
Streamlit apps require a separate
.sh
such asapp.sh
startup script. -
You can configure the route prefix using
DOMINO_RUN_HOST_PATH
.
Flask (Python)
Flask is a lightweight Python web framework that is ideal for creating custom endpoints or fully bespoke applications.
from flask import Flask
import os
app = Flask(__name__)
@app.route("/")
def index():
return "Hello from Flask in Domino!"
if __name__ == '__main__':
app.run(port=8888, host='0.0.0.0')
-
Works out of the box with Domino’s routing and identity headers.
Shiny ®
Shiny is R’s standard framework for building interactive web applications with reactive components.
Option 2: Shell script to launch Shiny
In your .sh
file:
R -e 'shiny::runApp("./", port=8888, host="0.0.0.0")'
-
Shiny must run on
localhost:8888
to work in Domino. -
User-level identity headers are only supported by Shiny Server Pro.
These minimal examples are designed to help you quickly stand up a working app in Domino using your preferred framework. Each framework has specific requirements for launch behavior and routing, but all follow the same basic pattern.
-
Apps in Domino gives an overview of how apps work within the Domino ecosystem.
-
Create and Publish an App has instructions on creating and publishing your Apps, customizing the App’s URL, and sharing Apps with authorized users.
-
Learn more about how Apps in Domino run and what identity and permissions are used.