fairy-tales-bot

module
v0.0.0-...-57c001d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2023 License: MIT

README

fairy-tales-bot

Telegram bot for a simple fairy tales storage with audio records within a telegram dialog

Setting up

Since current project version uses long polling and not a webhook approach, we can run it both locally and on a server.

  1. Create telegram bot with using @BotFather
  2. Install Docker, Docker Compose
  3. Clone project
  4. Copy environment variables file and edit it (with using vim/neovim, emacs, nano, micro, whatever) by assigning proper values:
cp ./.env.example ./.env
  1. Run build and run project:
make up

To stop containers run (if you need or want it):

make down

For other operations with containers consider using docker command as you usually do. If not, but you need, feel free to check the docs (LMAO, ya aint know docker in 2k23?! What the dev r u?! Hope ya know how to use git and bash at least)

Interesting facts:

  • The bot docker image uses the simplest and smallest possibly docker image base — scratch as its last build stage, so it has the weight of a compiled binary (and a pem cerificate to use TLS) only and weights only around 13-14MB! I used this article to do so (the article to do the same with Rust in docker came out just some days ago)

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL