Build & Run

This documentation pertains to the unsupported version of NeoDash, as part of Neo4j Labs. For users of the supported NeoDash offering, refer to NeoDash commercial.

To start developing the application, you will need to set up the development environment.

Run & Build using yarn

NeoDash is built with React. You will need yarn installed to run the web app.

Use a recent version of yarn and node to build NeoDash. The application has been tested with yarn 1.22.17 & node v18.8.0.

To run the application in development mode:

  • clone this repository.

  • open a terminal and navigate to the directory you just cloned.

  • run yarn install to install the necessary dependencies.

  • run yarn run dev to run the app in development mode.

  • the application should be available at http://localhost:3000.

To build the app for production:

  • follow the steps above to clone the repository and install dependencies.

  • execute yarn run build. This will create a build folder in your project directory.

  • deploy the contents of the build folder to a web server. You should then be able to run the web app.

Run locally with Docker

Pull the latest image from Docker Hub to run the application locally:

# Run the application on http://localhost:5005
docker pull neo4jlabs/neodash:latest
docker run -it --rm -p 5005:5005 neo4jlabs/neodash

# If you want to run on a custom port, set an environment variable
export NGINX_PORT=5008
docker run -it --rm -e NGINX_PORT=5008 -p 5008:5008 neo4jlabs/neodash

Windows users may need to prefix the docker run command with winpty.

Build Docker image

A pre-built Docker image is available on DockerHub. This image is built using the default configuration (running in editor mode, without SSO).

To build the image yourself:

Make sure you have a recent version of docker installed to build the multi-stage NeoDash image and run it.

On Unix (Mac/Linux) systems:

docker build . -t neodash

If you use Windows, you might need to prefix the command with winpty:

winpty docker build . -t neodash

After building, you can run the image with:

docker run -it –rm -p 5005:5005 neodash

Run on Kubernetes

To deploy using YAML files

YAML examples are available in the NeoDash repository. Here is an example of a pod definition YAML file to create a NeoDash pod in a cluster:

apiVersion: v1
kind: Pod
metadata:
  name: neodash
  labels:
    project: neodash
spec:
  containers:
    - name: neodash
      image: neo4jlabs/neodash:latest
      ports:
        - containerPort: 5005

Creating a Kubernetes service to expose the application:

apiVersion: v1
kind: Service
metadata:
    name: neodash-svc
spec:
    type: LoadBalancer
    ports:
    - port: 5005
      targetPort: 5005
    selector:
      project: neodash

To deploy using a Helm Charts

A Kubernetes Helm chart is available in the the NeoDash repository and here is the full example of the Helm chart values.yaml file,

# Name override or full name override
nameOverride: ''
fullnameOverride: neodash-test

# Number of pods
replicaCount: 1

# Image Details
image:
  repository: neo4jlabs/neodash
  pullPolicy: IfNotPresent
  tag: 'latest'
imagePullSecrets: [] # Image pull secret if any

# Pod annotations, labels and security context
podAnnotations: {}
podLabels: {}
podSecurityContext: {}

# Mode configuration using environment variables
# Set reader mode environment variables when enable_reader_mode is true
enable_reader_mode: true
env:
  - name: "ssoEnabled"
    value: "false"
  - name: "standalone"
    value: "true"
  - name: "standaloneProtocol"
    value: "neo4j+s"
  - name: "standaloneHost"
    value: "localhost"
  - name: "standalonePort"
    value: "7687"
  - name: "standaloneDatabase"
    value: neo4j
  - name: "standaloneDashboardName"
    value: "test"
  - name: "standaloneDashboardDatabase"
    value: neo4j
  - name: "standaloneAllowLoad"
    value: "false"
  - name: "standaloneLoadFromOtherDatabases"
    value: "false"
  - name: "standaloneMultiDatabase"
    value: "false"

# Environment variable from secret
envFromSecrets: []
  # standaloneUsername:
      # secretName: "neo4j-connection-secrets"
      # key: "username"
  # standalonePassword:
      # secretName: "neo4j-connection-secrets"
      # key: "password"

# Service details
service:
  type: LoadBalancer # Can also be ClusterIP or NodePort
  port: 5005 # For the service to listen in for Traffic
  targetPort: 5005 # Target port is the container port
  annotations: {} # Service annotations for the LoadBalance

# Ingress
ingress:
  enabled: false # Enable Kubernetes Ingress
  className: 'alb' # Class Name
  annotations: {} # Cloud LoadBalancer annotations
  hosts: []
    # - host: neodash.example.com
    #   paths:
    #     - path: '/'
    #       pathType: Prefix
  tls: []

# Pod resources request, limits and health check
resources:
  requests:
    memory: "64Mi"
    cpu: "250m"
  limits:
    memory: "128Mi"
    cpu: "500m"
livenessProbe:
  httpGet:
    path: /*
    port: 5005
readinessProbe:
  httpGet:
    path: /*
    port: 5005

# Pod Autoscaler
autoscaling:
  enabled: false
  # minReplicas: 1
  # maxReplicas: 100
  # targetCPUUtilizationPercentage: 80

# Pod Volumes
volumes: []
volumeMounts: []

# Service Account
serviceAccount:
  create: true
  automount: true
  # annotations: {}
  # name: ''