This commit is contained in:
Joshua Laymon
2025-08-12 22:07:25 -05:00
parent 2fb9e7c39c
commit 3458501272
24 changed files with 268 additions and 26444 deletions
+3 -9
View File
@@ -1,20 +1,14 @@
#!/usr/bin/env bash
set -e
echo "Waiting for Postgres to be ready..."
until pg_isready -h db -p 5432 -U "${POSTGRES_USER:-illustrations}" >/dev/null 2>&1; do
echo "Waiting for Postgres..."
until pg_isready -h "${POSTGRES_HOST:-db}" -p "${POSTGRES_PORT:-5432}" -U "${POSTGRES_USER:-illustrations}" >/dev/null 2>&1; do
sleep 1
done
echo "Postgres is ready."
python manage.py migrate
python manage.py init_users
if [ "${IMPORT_SEED_ON_START}" = "true" ] && [ -f "${SEED_CSV}" ] && [ ! -f /data/imports/.seed_done ]; then
echo "Seeding database from ${SEED_CSV}..."
echo "Seeding from ${SEED_CSV}..."
python manage.py import_seed "${SEED_CSV}"
touch /data/imports/.seed_done
echo "Seed import complete."
fi
python manage.py runserver 0.0.0.0:8000