Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ To access an existing Ladybug database, you can mount its path to the `/database
docker run -p 8000:8000 \
-v {path to the directory containing the database file}:/database \
-e LBUG_FILE={database file name} \
--rm lbugdb/explorer:latest
--rm ghcr.io/ladybugdb/explorer:latest
```

By mounting local database files to Docker via `-v {path to the directory containing the database file}` and `-e LBUG_FILE={database file name}`, the changes done in the UI will persist to the local database files after the UI is shutdown. If the directory is mounted but the `LBUG_FILE` environment variable is not set, Ladybug Explorer will look for a file named `database.kz` in the mounted directory or create a new database file named `database.kz` in the mounted directory if it does not exist.
By mounting local database files to Docker via `-v {path to the directory containing the database file}` and `-e LBUG_FILE={database file name}`, the changes done in the UI will persist to the local database files after the UI is shutdown. If the directory is mounted but the `LBUG_FILE` environment variable is not set, Ladybug Explorer will look for a file named `database.lbdb` in the mounted directory or create a new database file named `database.lbdb` in the mounted directory if it does not exist.

The `--rm` flag tells docker that the container should automatically be removed after we close docker.

Expand All @@ -42,7 +42,7 @@ This is simply done by removing the `-v` flag in the example above. If no databa
with `-v`, the server will be started with an empty database.

```bash
docker run -p 8000:8000 --rm lbugdb/explorer:latest
docker run -p 8000:8000 --rm ghcr.io/ladybugdb/explorer:latest
```

Click on the `Datasets` tab on the top right corner and then: (i) you can select one of the bundled dataset
Expand All @@ -60,7 +60,7 @@ docker run -p 8000:8000 \
-v {path to the directory containing the database file}:/database \
-e LBUG_FILE={database file name} \
-e MODE=READ_ONLY \
--rm lbugdb/explorer:latest
--rm ghcr.io/ladybugdb/explorer:latest
```

In read-only mode, you can still issue read queries and visualize the results, but you cannot run write queries or modify the schema.
Expand All @@ -76,7 +76,7 @@ docker run -p 8000:8000 \
-v {path to the directory containing the database file}:/database \
-e LBUG_FILE={database file name} \
-e LBUG_BUFFER_POOL_SIZE=1073741824 \
--rm lbugdb/explorer:latest
--rm ghcr.io/ladybugdb/explorer:latest
```

#### In-memory mode
Expand All @@ -86,7 +86,7 @@ By default, Ladybug Explorer is launched in disk-based mode. If you want to laun
```bash
docker run -p 8000:8000 \
-e LBUG_IN_MEMORY=true \
--rm lbugdb/explorer:latest
--rm ghcr.io/ladybugdb/explorer:latest
```

In in-memory mode, the database is stored in memory and all changes are lost when the server is shut down even if a database directory is mounted. Also, read-only access mode is not supported in in-memory mode.
Expand All @@ -98,7 +98,7 @@ In WebAssembly mode, Ladybug Explorer is launched with `@ladybugdb/wasm-core`, w
```bash
docker run -p 8000:8000 \
-e LBUG_WASM=true \
--rm lbugdb/explorer:latest
--rm ghcr.io/ladybugdb/explorer:latest
```

In WebAssembly mode, the database is stored in the current browser session and all changes are lost when the browser tab is closed or when the tab is refreshed. All other configuration parameters are ignored in WebAssembly mode.
Expand All @@ -111,7 +111,7 @@ If you want to launch Ladybug Explorer with the latest development build of Lady
docker run -p 8000:8000 \
-v {path to the directory containing the database file}:/database \
-e LBUG_FILE={database file name} \
--rm lbugdb/explorer:dev
--rm ghcr.io/ladybugdb/explorer:dev
```

The `dev` tag is updated daily, approximately two hours after the latest dev build of Ladybug is released.
Expand All @@ -121,7 +121,7 @@ The `dev` tag is updated daily, approximately two hours after the latest dev bui
When a new version of Ladybug Explorer is released after the initial launch, re-launching the container WILL NOT automatically update the local image to the latest version. To update the local image to the latest version, you can run the following command.

```bash
docker pull lbugdb/explorer:latest
docker pull ghcr.io/ladybugdb/explorer:latest
```

After pulling the latest image, you can re-launch the container with the same command as before.
Expand All @@ -136,7 +136,7 @@ For example:
podman run -p 8000:8000 \
-v {path to the directory containing the database file}:/database:U \
-e LBUG_FILE={database file name} \
--rm lbugdb/explorer:latest
--rm ghcr.io/ladybugdb/explorer:latest
```

or,
Expand All @@ -146,7 +146,7 @@ podman run -p 8000:8000 \
-v {path to the directory containing the database file}:/database \
-e LBUG_FILE={database file name} \
--userns=keep-id \
--rm lbugdb/explorer:latest
--rm ghcr.io/ladybugdb/explorer:latest
```

Please refer to the official Podman docs for [mounting external volumes](https://docs.podman.io/en/latest/markdown/podman-run.1.html#mounting-external-volumes) and [user namespace mode](https://https://docs.podman.io/en/latest/markdown/podman-run.1.html#userns-mode) for more information.
Expand Down Expand Up @@ -233,17 +233,17 @@ env LBUG_DIR={directory containing ladybug database} LBUG_FILE={database file na
### Run production server with Docker

```
docker build -t lbugdb/explorer:latest .
docker build -t ghcr.io/ladybugdb/explorer:latest .
docker run -p 8000:8000 \
-v {path to the directory containing the database file}:/database \
-e LBUG_FILE={database file name} \
--rm lbugdb/explorer:latest
--rm ghcr.io/ladybugdb/explorer:latest
```

## Deployment

A [GitHub actions pipeline](.github/workflows/build-and-deploy.yml) has been configured to automatically build and deploy
the Docker image to [Docker Hub](https://hub.docker.com/) upon pushing to the master branch. The pipeline will build images
the Docker image to [GitHub Container Registry](https://ghcr.io/) upon pushing to the master branch. The pipeline will build images
for both `amd64` and `arm64` platforms.

## Contributing
Expand Down
29 changes: 3 additions & 26 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions src/components/MainLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@
<div class="modal-body">
<div v-if="modeStore.isDemo">
<p>
This WebAssembly-powered demo of <a href="https://kuzudb.com/">Ladybug</a> lets you import and query graph
This WebAssembly-powered demo of <a href="https://ladybugdb.com/">Ladybug</a> lets you import and query graph
data using
<a
href="https://docs.ladybugdb.com/cypher/"
Expand All @@ -210,10 +210,7 @@
See the <a
href="https://docs.ladybugdb.com/visualization/lbug-explorer/"
target="_blank"
>docs</a> or <a
href="https://www.youtube.com/watch?v=yKcVV_bhBTo"
target="_blank"
>video tutorial</a> for help.
>docs</a> for help.
<br><br>
Note: Data is not saved between sessions.
</p>
Expand Down
4 changes: 2 additions & 2 deletions src/server/utils/Database.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ class Database {
} else {
let dbFileName = process.env.LBUG_FILE;
if (!dbFileName) {
dbFileName = "database.kz";
dbFileName = "database.lbdb";
logger.warn(
"LBUG_FILE environment variable not set, using default database file name: database.kz"
"LBUG_FILE environment variable not set, using default database file name: database.lbdb"
);
} else {
logger.info(`Using database file: ${dbFileName}`);
Expand Down
Loading