Custom Apps are used to run additional tools that are not provided by default (e.g. Jupyterlab, Jupyter, and RStudio). Examples of Custom Apps could be a different browser based editor or a dashboard.
A Custom App is defined by a name, description, the port on which the app runs, and an optional shell command that is executed inside the running Project container when the App is started.
When an App is added to a Project, a button is added to the launcher. When you click this button the command (if provided) is run inside the Project container and a new tab is opened to the App.
To add a Custom App to a Project, navigate to the "Environment" tab. Add any required packages or dependencies to run your App. This could be as simple as a
pip package or is complex as Custom Docker instructions and some code that you write.
Then, add the Custom App by providing:
- A short name that is 1 to 10 characters long
- A short description of the App
- A port number. This is the port on which the App is expected to run. The port provided is automatically added to the Project's container via an
EXPOSEinstruction in its Dockerfile.
- An optional shell command. If provided, when the App is clicked in the launch menu this command is executed inside the running container.
All Apps run on a prefix
All Apps are run through the Client's central proxy and are automatically assigned and routed via a prefix at runtime. Depending on your App you may need to provide this prefix using the environment variable $APP_PREFIX
There are several important and useful environment variables that are available when running your App and specifying the command:
- $APP_PREFIX - The prefix at which the App will be hosted. Typically this is of the format
/<app name>/<short uuid>. For Apps that have an interactive interface, you typically need to provide this prefix to your application for links to work.
- $PROJECT_CODE - The path to the
codedirectory in the Project
- $PROJECT_INPUT - The path to the
inputdirectory in the Project
- $PROJECT_OUTPUT - The path to the
outputdirectory in the Project
To use a Custom App that has been added to a Project, simply click the dropdown on the Launch button to show all available Apps. Then click on the desired App. If the container is not running it will start and then the App will be started.
To modify an existing Custom App, click on the small edit button (the pencil icon) in the Custom App list. After making edits, click the to save your changes or the to cancel.
To remove a Custom App, simply click on the trashcan icon in the Custom App list.
Updated 8 months ago