Skip to content

pavloniym/foodometer

Repository files navigation

Foodometer

Have business lunch with your colleagues, and the boss doesn't pay your meals' bills?
So you pay lunch bills in turn and are tired of keeping the order of payment in mind.
Ask Foodometer who pays today!

Foodometer

Docker Pulls Docker Stars Docker Automated build

Telegram Bot

This Telegram Bot developed using nodejs, sqlite3 and node-telegram-bot-api framework. To run your own foodometer you should follow next steps:

  1. Create your own telegram bot - search for @BotFather and follow instructions
  2. Run foodometer's docker-container with bot token and webhook url

You will need SSL certificate on your host machine to set telegram's webhook

To work with foodometer you should create a group and invite only your foodometer bot there. Bot will register group creator as participant. Any other invited users will be registered as participants too.

/meal - create new meal instance with list of group participants. Chose eaters, get payer and confirm meal!
/clear - remove all previous meals and start from clean sheet

Foodometer

Docker container

Docker container is built on top of Chloe image - so you can login into foodometer's container via SSH and SSH_PASSWORD environment variable is also included.

To run foodometer bot all you need is to execute this command:

docker run --name foodometer -d -p 8880:80 -e WEB_HOOK=<your_web_hook> -e BOT_TOKEN=<your_bot_token> -e LOCALE=en pavelshar/foodometer:latest

BOT_TOKEN - obtained token from @BotFather
WEB_HOOK - external https hook for server interaction
LOCALE - bot locale - en and ru are supported

Be accurate with port mappings: your internal 8880 should be mapped with your external WEB_HOOK

Thanks messagesstickers.com for foodometer sticker