Skip to content

Devtailor/buerokratt-chatbot

 
 

Repository files navigation

Bürokratt's Chat Bot

Scope

This repo will primarily contain:

  1. Architectural and other documentation;
  2. Docker Compose file to set up and run Bürokratt's Chat Bot as a fully functional service;

Dev setup

  • Clone Ruuter
  • Navigate to Ruuter and build the image docker build -t ruuter .
  • Clone Resql
  • Navigate to Resql and build the image docker build -t resql .
  • Clone Data Mapper
  • Navigate to Data Mapper and build the image docker build -t data-mapper .
  • Clone TIM
  • Navigate to TIM and build the image docker build -t tim .
  • Clone Chat Widget
  • build chat widget image docker build -f Dockerfile.dev -t chat-widget .
  • Clone Authentication Layer
  • build chat widget image docker build -f Dockerfile.dev -t authentication-layer .
  • Clone RASA
  • choose dev branch and run docker build -t rasa .

Run with local bot

  • Change CHATBOT_BOT=http://bot:5005 in constants.ini
  • Navigate to current repo and run docker-compose $(find docker-* | sed -e 's/^/-f /') up -d

Run with remote bot

Database setup

  • For setting up the database initially, run docker run --platform linux/amd64 --network=bykstack riaee/byk-users-db:liquibase20220615 --url=jdbc:postgresql://users_db:5432/byk --username=byk --password=01234 --changelog-file=./master.yml update
  • Run migrations added in this repository by running the helper script ./migrate.sh
  • When creating new migrations, use the helper ./create-migration.sh name-of-migration which will create a timestamped file in the correct directory and add the required headers

TIM Cookies

  • To be able to use endpoints, you must have a valid cookie generated by TIM so that TIM can validate it
  • for example in test DB To create a valid TIM JWT, call cs-login and pass {"login": "EE30303039914"} and then copy the value of jwt response and added it as the value for the cookie named customJwtCookie

Open Search

  • To Initialize Open Search run ./deploy-opensearch.sh <URL> <AUTH> <Is Mock Allowed - Default false>
  • To Use Opensearch locally run ./deploy-opensearch.sh http://localhost:9200 admin:admin true

Use external components.

Currently, Header and Main Navigation used as external components, they are defined as dependency in package.json

 "@buerokrat-ria/header": "^0.0.1"
 "@buerokrat-ria/menu": "^0.0.1"
 "@buerokrat-ria/styles": "^0.0.1"

Notes

Ruuter Internal Requests
  • When running ruuter either on local or in an environment make sure to adjust - application.internalRequests.allowedIPs=127.0.0.1,{YOUR_IPS} under ruuter environments

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 74.1%
  • SCSS 17.8%
  • Python 3.1%
  • JavaScript 2.8%
  • Handlebars 1.1%
  • Shell 0.7%
  • Other 0.4%