This repository helps you to build a set of webpack bundles that can host a fixed set of Kui Notebooks. The build is dockerized, so you don't even need to clone this template repository to get started.
docker run --rm \
-v "$BUNDLE_TARGET_DIR":/kui/dist/webpack \
-v "$NOTEBOOKS_DIR":/config.d \
-v "$CONFIG_DIR":/config.d \
-e OFFLINE=$OFFLINE \
quay.io/kuishell/notebook-builder
You will need to specify three inputs:
$BUNDLE_TARGET_DIR
: absolute path to the target directory for the generated web app (index.html, etc.).$NOTEBOOKS_DIR
: absolute path to your Kui Notebooks.$CONFIG_DIR
: absolute path to your config choices, such as the name of the application.OFFLINE=true|false
. If you want a static single page application, setOFFLINE=true
. (Coming soon: quick builds for a hosted client/server architecture)
A suggested usage is to instantiate this template repository once per
desired web application. This lets you store the config.d
elements
(application name, set of notebooks) on a per-app basis. Also, if you
clone the repository, this process is slightly simplified:
./build.sh /tmp/bundles $PWD/notebooks $PWD/config.d offline
If you wish to to live development, use the watch.sh
script in place
of build.sh
. Once the watcher is up, you can visit
http://localhost:9080
. Changes to your notebooks or to your config.d
entries should be reflected on that web page.
You may find an example configuration directory here. You may set the application title and favicon here. See the example config for guidance.
Download Kui. You
may find help in the stock Kui client by consulting the
Notebooks->Make Your Own Notebook
menu. Once you have a candidate
notebook, do a File->Save, and save it to your config.d/notebooks
directory.
If for some reason you need to generate a custom base image, consult the advanced documentation.