- Notifications
You must be signed in to change notification settings - Fork151
Integrate Telegram into your workflow – Trello, Gitlab, Bitbucket and other bots
License
requilence/integram
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Framework and platform to integrate services withTelegram using the officialTelegram Bot API
ℹ️ Individual integration repos are located athttps://github.com/integram-org.
Just use these links to add bots to your Telegram
GitHub – GitHub bot was developed byIgor Zhukov and it is not part of Integram
Did not find your favorite service?🤘 Vote for it
- Prerequisites :
- You will needdocker anddocker-compose installed
- Create your Telegram bot(s) by talking to@BotFather
- Clone the repo:
git clone https://github.com/requilence/integram&&cd integram
- Check the
docker-compose.yml
file for the required ENV vars for each serviceE.g. in order to run the Trello integration you will need to export:
INTEGRAM_BASE_URL – the base URL where your Integram host will be accessible, e.g.https://integram.org
INTEGRAM_PORT – if set to 443 Integram will use ssl.key/ssl.cert at /go/.conf.
- ForLet's Encrypt:
ssl.cert
has to befullchain.pem
, notcert.pem
This directory is mounted on your host machine. Just get the path and put these files inside
## Get the path of config directory on the host machine docker volume inspect -f'{{ .Mountpoint }}' integram_data-mainapp
- ForLet's Encrypt:
TRELLO_BOT_TOKEN – your bot's token you got from@BotFather
You will need toget your own OAuth credentials from Trello
- TRELLO_OAUTH_ID – API Key
- TRELLO_OAUTH_SECRET – OAuth Secret
For more detailed info about other services you should check the corresponding repo athttps://github.com/integram-org
- Export the variables you identified in the previous step, for instance on linux this should be something like:
export INTEGRAM_PORT=xxxxexport ...
- Now you can run the services (linux: careful if you need to sudo this, the exports you just did will not be available) :
docker-compose -p integram up trello gitlab## Here you specify the services you want to run
- Or in background mode (add
-d
):
docker-compose -p integram up -d trello gitlab
- You should now see Integram's startup logs in your console
- In Telegram, you can now start your bots (
/start
) and follow their directions, configure them using/settings
- Some useful commands:
## Check the containers status docker ps## Fetch logs for main container docker logs -f$(docker ps -aqf"name=integram_integram")
- To update Integram to the latest version:
## Fetch last version of images docker-compose pull integram trello gitlab## Restart containers using the new images docker-compose -p integram up -d trello gitlab
First you need to install all requirements:Go 1.9+,Go dep,MongoDB 3.4+ (for data),Redis 3.2+ (for jobs queue)
Then, usingthis templatecreate the
main.go
file and put it insrc/integram/
inside your preferred working directory (e.g./var/integram/src/integram/main.go
)
## set the GOPATH to the absolute path of directory containing 'src' directory that you have created beforeexport GOPATH=/var/integramcd$GOPATH/src/integram## install dependencies dep init
- Specify the required ENV variables – check theDocker way section
- Run it
go build integram&& ./integram
Dependencies are specified inGopkg.toml
and fetched usingGo dep
Feel free to send PRs. If you want to contribute new service integrations, pleasecreate an issue first. Just to make sure someone is not already working on it.
- Telegram Bindings
- Gin – HTTP router and framework
- Mgo – MongoDB driver
- Jobs – background jobs
- Logrus – structure logging
Code licensed under GPLV3license