DevOps Course test application
- Create your own telegram bot with BotFather bot. Use command
/newbot
. It will ask for bot name and bot telegram user name. Provide these values. In final response message there will be API token, click at this message once to copy this token. - Call command
read -s TELE_TOKEN
to read from the input, use insert from buffer hotkey akaCMD+V
,CTRL+V
, and hit enter - Check saved token with
echo $TELE_TOKEN
terminal command - Use
export TELE_TOKEN
to export this variable into the environment - start Kbot with
./kbot start
command - Open your telegram bot link that was obtained at the BotFather and start typing some bot commands
- Each make and build command has such environment variables
TARGETOS
,TARGETARCH
they define target operation system and processor architecture. See variables defaults atMakefile
. - See supported os and architecture values here Golang Environment
TARGETOS=darwin TARGETARCH=arm64 make build
- this example command will prepare application binary filemake image
- create docker imagemake push
- push docker image into registrymake clean
- remove binary and docker image
docker run registry.digitalocean.com/suhovius/kbot:v1.0.5-07d3380-amd64
/start hello
- see bot version. Output example: 'Hello I'm Kbot 1.0.2!'
/start rand
- generate random number. Output example: 'Here is some random number 3!'