Checkout suitable branch. Though master
branch is used for development, it should still be stable enough to use in
production. Change the .env
file and provide configurations for reCAPTCHA,
CBR Inference Engine and KnowledgeBase (KB) services.
Once all the configurations are provided local development can commence or a production package could be built. Built static assets are the ones that should be used on the server.
Current stable Node.js version should work. Currently, used version is 14. Please use an older version if you run into issues while installing the dependencies.
npm install
npm run serve
npm run build
npm run test:unit
npm run test:e2e
npm run lint
Use any stable branch for building a docker container as it will have all the necessary .env
file configurations set
during build time. Docker image requires some configuration logic to be available at runtime, which would make changes
to the package configuration.
Container uses node
image to build the package, then bases itself on the latest nginx
container to serve the static
assets.
Required environment variables:
- APP_RECAPTCHA_KEY - recaptcha V3 key that will be used when submitting suggestions to the Knowledge Base service
- APP_CHATBOT_URL - base ULR of the chatterbot powered service that will be used to ask questions
- APP_KNOWLEDGE_BASE_URL - Knowledge Base service URL, used to submit suggestions and ratings
docker build -t sherpa/helper .
Please make sure that you provide correct values for all the environment variables. The ones used in the command are merely placeholders.
docker run -d --name=sherpa-helper \
-e APP_RECAPTCHA_KEY=12345 \
-e APP_CHATBOT_URL=http://chatbot \
-e APP_KNOWLEDGE_BASE_URL=http://knowledgebase \
-p80:80 sherpa/helper
Please see a sample docker-compose.yml
file located in docker/
subdirectory. It requires you to build the Docker
image before you run it. You would also need to provide correct environment values and replace the placeholders.
docker-compose -p sherpa-helper up -d
Stop and remove containers:
docker-compose -p sherpa-helper down
Supported by Erasmus+ funding programme.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.