label-studio/deploy/docker-entrypoint.sh

18 lines
337 B
Bash

#!/usr/bin/env bash
set -e
# if wait-for-postgres script is specified, we sleep in the loop until Postgre is up
if [[ "$1" = "./deploy/wait-for-postgres.sh" ]]; then
# ./deploy/wait-for-postgres.sh db
$1
shift 1
fi
echo "=> Do database migrations..."
python3 label_studio/manage.py migrate
echo "=> Run $@..."
exec "$@"