p00003/entrypoint.sh
greenamber676 d40bb5a10f
Some checks failed
DEV-234/pipeline/head There was a failure building this commit
addeded jenkins pipe
2025-01-09 20:05:17 -05:00

21 lines
427 B
Bash
Executable File

#!/bin/sh
if [ "$DATABASE" = "postgres" ]
then
echo "Waiting for postgres..."
while ! nc -z $POSTGRESQL_HOST $POSTGRESQL_PORT; do
sleep 0.1
done
echo "PostgreSQL started"
fi
find . -path "*/main/migrations/*.py" -not -name "__init__.py" -delete
find . -path "*/main/migrations/*.pyc" -delete
python manage.py makemigrations
python manage.py migrate
python manage.py runserver 0.0.0.0:8000
exec "$@"