Skip to content
This repository has been archived by the owner on Feb 26, 2023. It is now read-only.
Ilya Glotov edited this page Aug 16, 2018 · 5 revisions

Configuration

Cortexbot is configured using three environment variables:

  • CORTEX_BOT_PASSWORD defines the password that you would like to use to access cortexbot
  • CORTEX_LOCATION is the actual url of your Cortex instance
  • TGBOT_API_TOKEN that you can obtain from BotFather
  • CORTEX_TIMEOUT defines timeout duration for Cortex job in a Go's duration string format. Defaults to 5 minutes.

Ways to start bot

Prebuilt binary

Check out releases page

Docker

An example docker-compose.yml file is included.

If you want to persist the list of users who have access to a cortexbot you should mount boltdb storage file to the same folder where a cortexbot binary actually runs from.

Build from sources

Assuming you have installed go version (at least version 1.5):

go get -u github.com/ilyaglow/cortex-tgbot/cmd/cortexbot

That's all, you should now have a compiled binary at $GOPATH/bin/cortexbot

Clone this wiki locally