Telegram: @get_neko_bot
- Install Docker and Docker Compose
- Clone this repository
git clone https://github.com/Desiders/get_anime_bot_rs.git - Copy
.env.exampleto.envand fill it with your data - Run
docker compose --profile dev upto start the project in development mode ordocker compose --profile prod upin production mode.
You can also use `just` to run the project with `just run-docker` or `just run-docker-prod` commands
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,postgresMigrations 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-runRun 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_botFor more info, check README.md file of sqlx-cli crate and docker-compose file docs.