Skip to content

JianFengH/chatbot

Repository files navigation

Chatbot

This project is about a chatbot on Telegram to study the cloud computing. You can refer to the project of chatbot-deploy which is conveinent for the environment of development and deployment. You can refer to an instruction for bots on Telegram to learn about how to create a bot and more.

An example of chatbot on Telegram

telegram-bot

Initialize Database

You can find sql files under the directory of db to initialize the database.

Create a file config.ini under the root directory

[postgresql]
host=
database=
user=
password=

[telegram]
access_token=

How to run

Run python directly, in Terminal

pip install -r requirements.txt

python chatbot.py

Run docker command to test chatbot image before pushing code

docker build -t chatbot:test .

docker run -it --rm -v "$(pwd)/config.ini:/app/config.ini"  --name test_chatbot chatbot:test

Run the script to test chatbot image before pushing code

./docker-test.sh

Run docker by using the remote chatbot image

You can view the remote chatbot image from dockerjeffery/chatbot.

docker run -it --rm -v "$(pwd)/config.ini:/app/config.ini"  --name test_chatbot dockerjeffery/chatbot

About

A chatbot on Telegram using technologies of cloud computing.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published