entrypoint.sh 607 Bytes
#!/bin/sh

if [ "$DATABASE" = "postgres" ]
then
    echo "Waiting for postgres..."

    while ! nc -z $SQL_HOST $SQL_PORT; do
      sleep 0.1
    done

    echo "PostgreSQL started"
fi

python3 collector/manage.py makemigrations --noinput
python3 collector/manage.py migrate
python3 collector/manage.py configure_marcell_pipelines
python3 collector/manage.py load_eurovoc_terms -i resources/eurovoc -l pl
python3 collector/manage.py load_eurovoc_terms -i resources/eurovoc -l en
python3 collector/manage.py load_iate_terms -i resources/iate/iate.tbx
python3 collector/manage.py map_eurovoc_terms

exec "$@"