Description
Go application with telegram bot. Consider it like test example.
Content
Architecture
Project has next architecture:
Realized concept
Created fsm model with 3 states:
-
First state
a) to second state
-
Second state
a) to first state
b) to third state
-
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
- Run python script for initialize
cd scripts
python3 git_clone_init.py
- Check environment variables in
develop.env
or production.env
- Run flyway migrations and seeds with PostgreSQL (./*.sh is using docker)
cd scripts
sh ./migrations.sh
sh ./seeds.sh
- Start project
cd build
make run_develop
or for production version
make run_production
Docker container
Just for develop version now
- Run python script for initialize
cd scripts
python3 git_clone_init.py
- Check environment variables in
develop.env
or production.env
- Run docker
docker compose --env-file ./develop.env up -d
License
Go telegram bot
is MIT licensed.