telegram-go

module
v0.0.0-...-03ce398 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2022 License: MIT

README

Description

Go application with telegram bot. Consider it like test example.

Content

Architecture

Project has next architecture:

Arch image

Realized concept

Created fsm model with 3 states:

  1. First state

    a) to second state

  2. Second state

    a) to first state

    b) to third state

  3. Third state

    a) to first state

    b) show joke

Recommendations

Use not default password for database in environment configuration for avoid kdevtmpfsi malware

Run project

Standard Go application

  1. Run python script for initialize
cd scripts
python3 git_clone_init.py
  1. Check environment variables in develop.env or production.env
  2. Run flyway migrations and seeds with PostgreSQL (./*.sh is using docker)
cd scripts
sh ./migrations.sh
sh ./seeds.sh
  1. Start project
cd build
make run_develop

or for production version

make run_production

Docker container

Just for develop version now

  1. Run python script for initialize
cd scripts
python3 git_clone_init.py
  1. Check environment variables in develop.env or production.env
  2. Run docker
docker compose --env-file ./develop.env up -d

License

Go telegram bot is MIT licensed.

Jump to

Keyboard shortcuts

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