Files
monitoring-tg/docker/entrypoint.sh
2026-06-04 14:55:41 +03:00

17 lines
412 B
Bash

#!/bin/sh
set -e
# Run migrations on every container start. Idempotent: alembic skips
# revisions already applied. Skipped for one-shot commands like `alembic`
# itself (would deadlock when explicitly invoked) and for the auth helper.
case "$1" in
alembic|python\ -m\ parser_bot.auth|/bin/sh|sh|bash)
exec "$@"
;;
esac
echo "[entrypoint] running alembic upgrade head"
alembic upgrade head
exec "$@"