Included install sqlx-cli in justfile

This commit is contained in:
Imbus 2023-11-28 03:03:56 +01:00
parent 1058c8b477
commit dc54accd22

View file

@ -36,12 +36,15 @@ start-release: start-postgres-dev clean-podman init-sqlx build-container-release
podman run -d --network {{network}} -e {{env_string}} -p 8080:8080 --name frostbyte fb-server podman run -d --network {{network}} -e {{env_string}} -p 8080:8080 --name frostbyte fb-server
# Initializes the database, runs migrations and then prepares sqlx # Initializes the database, runs migrations and then prepares sqlx
init-sqlx: init-sqlx: install-sqlx
echo {{env_local}} > server/.env echo {{env_local}} > server/.env
cd server && sqlx database create --connect-timeout 40 # Postgres takes a while to start up cd server && sqlx database create --connect-timeout 40 # Postgres takes a while to start up
cd server && sqlx migrate run cd server && sqlx migrate run
cd server && cargo sqlx prepare cd server && cargo sqlx prepare
install-sqlx:
cargo install sqlx-cli
# Starts a postgres container for development # Starts a postgres container for development
[private] [private]
start-postgres-dev: create-network start-postgres-dev: create-network