xSAVIKx / chat-bot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status   license

Spine ChatBot

The ChatBot application is a Spine-based Google Chat bot that monitors the build statuses of Spine repositories and notifies the developers via the Google Chat.

Prerequisites

Build

In order to build the application, run:

./gradlew clean build

Also, it is possible to build a Docker image using jib:

./gradlew clean build jib

Running locally

It is possible to run the application as a docker image locally. In order to do that, please make sure you have saved the appropriate GCP credentials at .credentials/gcp-adc.json.

Then run the following script from the repository root folder:

export APP_PORT=8080
export LOCAL_PORT=9090
export CONTAINER_CREDENTIALS_PATH="/tmp/keys/gcp-adc.json"
export LOCAL_CREDENTIALS_PATH="${PWD}/.credentials/gcp-adc.json"
export GCP_PROJECT_ID="spine-chat-bot"
docker run \
    --tty \
    --rm \
    -p "${LOCAL_PORT}:${APP_PORT}" \
    -e "PORT=${APP_PORT}" \
    -e "MICRONAUT_SERVER_PORT=${APP_PORT}" \
    -e "GOOGLE_APPLICATION_CREDENTIALS=${CONTAINER_CREDENTIALS_PATH}" \
    -e "GCP_PROJECT_ID=${GCP_PROJECT_ID}" \
    -v "${LOCAL_CREDENTIALS_PATH}:${CONTAINER_CREDENTIALS_PATH}" \
    gcr.io/${GCP_PROJECT_ID}/chat-bot-server

The application will be available at 127.0.0.1:${LOCAL_PORT} (e.g. 127.0.0.1:9090). Locally-supplied GCP credentials are mounted into the image directly.

For detailed Application Default Credentials (ADC) guide for Docker see example Cloud Run guide.

Running in the Cloud

The application is deployed in the Google Cloud Platform cloud, and the overview of the cloud deployment is available in a separate document.

About

License:Apache License 2.0


Languages

Language:Java 84.8%Language:Kotlin 15.2%