Skip to content

just-ai/jaicf-jaicp-spring-template

Repository files navigation

JAICF Spring Bot template

Here is a ready to use JAICF bot template that utilises

How to use

Please refer to the detailed Quick Start that shows how to use this template with JAICP and CAILA NLU services.

Development

Run Dev.kt file in your IDE while developing the project. To make it work just create local.application.yml in resources folder with required options:

bot:
  accessToken: <your production JAICP token>

Note that this file is ignored by git and won't be populated to your repository.

Docker

Configuration

To overwrite default bot configuration, create application.yml file in docker/app/conf with required properties:

bot:
  accessToken: <your production JAICP token>

Build and run

  1. Build project with stage gradle task
  2. Run docker-compose up

This build script runs:

  • http://localhost:3000 Grafana monitoring dashboards
  • http://localhost:9000 Graylog logging system
  • http://localhost:8080 Your JAICF bot endpoint

Note that this builds a webhook version of your JAICF bot. Thus, you have to propagate your local 8080 port to the global web (through some gateway like ngrok) and configure your JAICP project with direct public URL of your machine.

  1. Define your public JAICF bot webhook in the webhook settings of your JAICP project using /webhook (e.g. https://somedomain.io/webhook)

Options

You can override default running options for every service in the docker folder.