Skip to content

nebula-contrib/nebulagraph-docker-ext

Repository files navigation

NebulaGraph

for NebulaGraph Docker Image Docker Extension GitHub release (latest by date)

This is the repo for NebulaGraph Docker Desktop extension.

dd-ext_demo.mp4

For a full deployment guide, refer to https://youtu.be/AOMexOohZYI

Install from Marketplace

Just click here to install if you already have the latest version of Docker Desktop installed.

Or search NebulaGraph from Docker Desktop Extension Marketplace.

Local development

You can use docker to build, install and push your extension. Also, we provide an opinionated Makefile that could be convenient for you. There isn't a strong preference of using one over the other, so just use the one you're most comfortable with.

To build the extension, use make build-extension or:

  docker buildx build -t weygu/nebulagraph-dd-ext:dev . --load

To install the extension, use make install-extension or:

  docker extension install weygu/nebulagraph-dd-ext:dev

If you want to automate this command, use the -f or --force flag to accept the warning message.

To preview the extension in Docker Desktop, open Docker Dashboard once the installation is complete. The left-hand menu displays a new tab with the name of your extension. You can also use docker extension ls to see that the extension has been installed successfully.

Frontend development

During the development of the frontend part, it's helpful to use hot reloading to test your changes without rebuilding your entire extension. To do this, you can configure Docker Desktop to load your UI from a development server. Assuming your app runs on the default port, start your UI app and then run:

  cd ui
  npm install
  npm run dev

This starts a development server that listens on port 3000.

You can now tell Docker Desktop to use this as the frontend source. In another terminal run:

  docker extension dev ui-source weygu/nebulagraph-dd-ext:dev http://localhost:3000

In order to open the Chrome Dev Tools for your extension when you click on the extension tab, run:

  docker extension dev debug weygu/nebulagraph-dd-ext:dev

Each subsequent click on the extension tab will also open Chrome Dev Tools. To stop this behaviour, run:

  docker extension dev reset weygu/nebulagraph-dd-ext:dev

Clean up

To remove the extension:

docker extension rm weygu/nebulagraph-dd-ext:dev

Reference

Read the blog post about this extension.

Follow the steps in the NebulaGraph Quick Start Workflow to get started with NebulaGraph Docker Desktop extension.