Files
WebApi/docker-entrypoint.sh
T
2026-09-29 10:34:32 -06:00

38 lines
874 B
Bash

#!/bin/sh
set -e
case "${AUTH_LITE_ENABLED-false}" in
true|false)
;;
*)
echo "AUTH_LITE_ENABLED must be exactly 'true' or 'false'" >&2
exit 1
;;
esac
case "${AUTH_LITE_SEED_DEMO_USERS-false}" in
true|false)
;;
*)
echo "AUTH_LITE_SEED_DEMO_USERS must be exactly 'true' or 'false'" >&2
exit 1
;;
esac
mkdir -p /data
cd /app/Persistance
uv run alembic -c persistance/cacu/alembic.ini upgrade head
uv run alembic -c persistance/cama/alembic.ini upgrade head
uv run alembic -c persistance/tea/alembic.ini upgrade head
if [ "${AUTH_LITE_ENABLED-false}" = "true" ]; then
uv run alembic -c persistance/auth/alembic.ini upgrade head
fi
cd /app/WebApi
if [ "${AUTH_LITE_ENABLED-false}" = "true" ] && [ "${AUTH_LITE_SEED_DEMO_USERS-false}" = "true" ]; then
uv run python -m webapi.auth_demo_seed --ensure
fi
exec uv run python main.py