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.example
to.env
and fill it with your data - Run
docker compose --profile dev up
to start the project in development mode ordocker 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
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:[email protected]:5432/get_anime_bot
For more info, check README.md
file of sqlx-cli
crate and docker-compose
file docs.