For building and running the application you need:
To get started you can simply clone this repository using git:
git clone https://github.com/kgrid/kgrid-library.git
cd kgrid-library
This quick start will run the activator and load two example knowledge objects for testing. This objects are located in the shelf directory at the root of the project. By default application will start up and PORT 8080.
$ mvn clean package
$ java -jar applicatoin/target/kgrid-activator*.jar
Alternatively you can use the Spring Boot Maven plugin like so:
mvn clean spring-boot:run
Once Running access the Activators Health Endpoint. All statuses reported should be UP
"status": "UP",
"shelf": {
"status": "UP",
The default list of activators that the library can push objects to can be overridden by setting the environment variable VUE_APP_KGRID_ACTIVATOR_URLS
with a semicolon-separated list of urls.
Unit and Integration tests can be executed via
mvn clean test
mvn clean verify
docker pull kgrid/kgrid-library
- Running in a container mapped to port 8080 (default port for the library)
docker run -p 8080:8080 --name library kgrid/kgrid-library
docker run -p 8080:8080 -v ${PWD}/shelf:/applications/shelf --name library -d kgrid/kgrid-library
- Example:
docker run -it --rm --network host -p 8080:8080 -v ${PWD}/shelf:/application/shelf --name library kgrid/kgrid-library:latest
-
This example has a few things going on:
--network host
Running with a network bridge (if your containerized activator needs to talk to the network, i.e. you're running an external runtime in another container)-it --rm
Running interactive and Removing the Container when stopped. can be found in the options
-
Once created, you can stop and start the container using
docker stop library
anddocker start library
.
- View Container Logs
docker logs library
- Access container
docker exec -it library sh