Standalone mode
On top of being an dashboard editor, NeoDash can be deployed in a standalone mode, allowing you to set up an architecture to publish and read dashboards.
Running in standalone mode mode will:
-
Disable all editing options.
-
Have a hardcoded Neo4j URL and database name.
-
Load a dashboard from Neo4j with a fixed name.
The following diagram illustrates how NeoDash standalone mode can be deployed alongside a standard editor mode instance:
Option 1 - standard deployment (non-Docker)
First, build NeoDash as described in Build and run.
After building, you have a dist
directory that you can deploy to a web server.
To configure the app to run in standalone mode, edit dist/config.json
and change the standalone
property to true
.
The other variables in config.json
should also be configured to match the hostname, port and database name of your Neo4j instance.
See Configuration settings for more on configuration variables.
As config.json
gets picked up at runtime by the application, users viewing the application now access the dashboard in standalone mode.
Option 2 - Docker deployment
You can configure the app to run in standalone by passing environment variables to Docker:
docker run -it --rm -p 5005:5005 \
-e ssoEnabled=false \
-e ssoProviders=[] \
-e ssoDiscoveryUrl="https://example.com" \
-e standalone=true \
-e standaloneProtocol="neo4j" \
-e standaloneHost="localhost" \
-e standalonePort="7687" \
-e standaloneDatabase="neo4j" \
-e standaloneDashboardName="My Dashboard" \
-e standaloneDashboardDatabase="dashboards" \
-e standaloneDashboardURL="dashboards" \
-e standaloneAllowLoad=false \
-e standaloneLoadFromOtherDatabases=false \
-e standaloneMultiDatabase=false \
-e standaloneDatabaseList="neo4j" \
neo4jlabs/neodash
Make sure that all of the environment variables are set to the correct values. This is described in more detail Configuration settings.
Alternatively, you can use environment variables from Docker compose or a Kubernetes deployment. |
Deep-linking
To dynamically view a deployed NeoDash dashboard, you can deep-link into a deployed dashboard. The following deep-linking options are available via URL parameters:
-
Appending
?page=1
to the URL opens a dashboard at the given page index (1
in this case, starting at0
). -
Appending
?neodash_person_name=Tom
to the URL sets a dashboard parameter as a default for the entire dashboard.
Multiple parameters can be used in a deep-link by concatenating them:
https://myneodashdeployment.com/?page=1&neodash_person_name=Tom&neodash_movie_name=The%20Matrix