Skip to content

Desiders/get_anime_bot_rs

Repository files navigation

get_anime_bot_rs

A telegram bot written to easily get anime images and GIF files of different genres

Telegram: @get_neko_bot

Installation

  • Install Docker and Docker Compose
  • Clone this repository git clone https://github.com/Desiders/get_anime_bot_rs.git
  • Copy .env.example to .env and fill it with your data
  • Run docker compose --profile dev up to start the project in development mode or docker compose --profile prod up in production mode.

You can also use `just` to run the project with `just run-docker` or `just run-docker-prod` commands

Migrations

To start the migrations, you need to launch the application, install sqlx-cli or something else for migration purposes, but here we use sqlx-cli.

$ cargo install sqlx-cli --no-default-features --features rustls,postgres

Migrations are places in ./src/infrastructure/database/migrations, so check migrations list and progress:

$ sqlx migrate info --source ./src/infrastructure/database/migrations --database-url postgres://{user}:{password}@{host}:{port}/{db}

Try to run a migration with dry-run parameter:

$ sqlx migrate run --source ./src/infrastructure/database/migrations --database-url postgres://{user}:{password}@{host}:{port}/{db} --dry-run

Run a migration:

$ sqlx migrate run --source ./src/infrastructure/database/migrations --database-url postgres://{user}:{password}@{host}:{port}/{db}

Example:

$ sqlx migrate run --source ./src/infrastructure/database/migrations --database-url postgres://admin:secretpass@127.0.0.1:5432/get_anime_bot

For more info, check README.md file of sqlx-cli crate and docker-compose file docs.

About

A telegram bot written to easily get anime images and GIF files of different genres

Resources

License

Stars

Watchers

Forks

Languages