Author: Glazunov Boris
Github: github.com/Borislavv | Gitlab: gitlab.com/Zendden
Email: glazunov2142@gmail.com | Phone: +7(904)-939-89-83 (Telegram)
-
Choose the target configuration file and fill it. Config files path:
root_app_dir/config
and also you need fill the .env. -
Install the Docker (with compose, if you building it from source) if you have not.
-
Change directory to the project root.
-
Build images if you didn't it before and up containers:
[Build and Up]: docker-compose up --build
[Just Up]: docker-compose up -
Now, you can use the bot and his lounch dashboard on http://localhost:8000/.
-
Choose the target configuration file and fill it. Config files path:
root_app_dir/config
. -
Install golang (optional, you can run you app with binary file), but you will need to run migrations, then install it.
-
Migrations (database in:
utf8_general_ci
):
UP :migrate -database "mysql://user:pass@tcp(localhost:3306)/translatortelegrambot" -path migrations up
Down:migrate -database "mysql://user:pass@tcp(localhost:3306)/translatortelegrambot" -path migrations down
-
Compile executable file run it or just run the code (in the second case, binary file will be compiling and remove after all):
4.1 Compile and run:
Compiling:
-cd cmd/app
-go build
Runnig:
-./main --config-path ./../../config/.env.dev.toml
4.2. Run without compiling (actualy 'with', but you will not see it):
Running:
-go run cmd/app/main.go --config-path config/.env.dev.toml