22 lines
351 B
Bash
22 lines
351 B
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
echo "[+] Formatting and checking..."
|
|
echo
|
|
ruff check --fix
|
|
black .
|
|
|
|
echo "[+] checking psql availability"
|
|
if ! pg_isready -h localhost -p 5432 ; then
|
|
echo "psql is down." >&2
|
|
exit 1
|
|
fi
|
|
echo "[+] psql is available!"
|
|
echo
|
|
|
|
echo "[+] Running migrations..."
|
|
echo
|
|
alembic upgrade head
|
|
|
|
echo "[+] Starting bot..."
|
|
python main.py |