invoices, order handling, db updates

This commit is contained in:
2026-02-14 23:09:21 +07:00
parent a3aaafd7ac
commit 50b1a8f80c
28 changed files with 508 additions and 44 deletions

33
entrypoints/startup.sh Normal file
View File

@@ -0,0 +1,33 @@
#!/bin/bash
set -e
echo "checking venv..."
if [[ "$VIRTUAL_ENV" != "" ]]
then
echo "process is in venv, skipping."
else
echo "entering venv."
source $(pwd)/venv/bin/activate
fi
echo
echo "formatting..."
ruff check . --fix
black .
echo
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
echo "running migrations..."
alembic upgrade head
echo
echo "starting the bot..."
exec python main.py