20 lines
336 B
Bash
20 lines
336 B
Bash
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
echo "formatting..."
|
|
ruff check . --fix
|
|
black .
|
|
|
|
echo "checking psql..."
|
|
if ! pg_isready -h localhost -p 5432; then
|
|
echo "psql is down, try again" >&2
|
|
exit 1
|
|
fi
|
|
echo "psql is up and is recieving connections."
|
|
|
|
echo "running migrations..."
|
|
alembic upgrade head
|
|
|
|
echo "starting the bot..."
|
|
exec python main.py |