Install Rust, Git, and PostgreSQL. Then install sqlx-cli and cross:
cargo install sqlx-cli --no-default-features --features native-tls,postgres
cargo install cross --git https://github.com/cross-rs/crossAdd the database URL to .env:
# username password hostname database
DATABASE_URL=postgres://postgres:postgres@localhost/postgresNow, run SQLX to create the database and run migrations:
cd packages/bot
sqlx database setup
# OR just run migrations
# sqlx migrate run
cargo sqlx prepareUse cargo run during development. When ready to deploy, run ./deploy.sh to compile CraftServer in release mode, back up the database, upload the binary to the server, and restart the bot.
The deploy script will ask to make a Git tag, but that can be skipped by hitting return. Run ./deploy.sh -h for a full list of options.