diff --git a/.env b/.env index 8ea47fc..56c16e4 100644 --- a/.env +++ b/.env @@ -14,10 +14,10 @@ DJANGO_ALLOWED_HOSTS=* CSRF_TRUSTED_ORIGINS= ADMIN_USERNAME=joshlaymon ADMIN_PASSWORD=1993llelMO65026illustrations -USER_USERNAME=boblaymon -USER_PASSWORD=power8 +# USER_USERNAME=boblaymon +# USER_PASSWORD=power8 # Seed import -IMPORT_SEED_ON_START=true -SEED_CSV=/data/imports/illustrations_seed.csv +IMPORT_SEED_ON_START=false +# SEED_CSV=/data/imports/illustrations_seed.csv OPENAI_API_KEY=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 \ No newline at end of file diff --git a/web/entrypoint.sh b/web/entrypoint.sh index 06823b8..2e7d857 100755 --- a/web/entrypoint.sh +++ b/web/entrypoint.sh @@ -1,14 +1,11 @@ #!/usr/bin/env bash set -e + 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 + 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 from ${SEED_CSV}..." - python manage.py import_seed "${SEED_CSV}" - touch /data/imports/.seed_done -fi -python manage.py runserver 0.0.0.0:8000 + +python manage.py runserver 0.0.0.0:8000 \ No newline at end of file diff --git a/web/requirements.txt b/web/requirements.txt index 368757f..c24e087 100644 --- a/web/requirements.txt +++ b/web/requirements.txt @@ -1,4 +1,4 @@ Django==5.0.6 psycopg2-binary==2.9.9 python-dateutil==2.9.0.post0 -openai>=1.0.0 \ No newline at end of file +openai>=1.0,<2.0 \ No newline at end of file diff --git a/web/version.txt b/web/version.txt index b208aac..b75003b 100644 --- a/web/version.txt +++ b/web/version.txt @@ -1 +1 @@ -v4.1.20 \ No newline at end of file +v4.1.21 \ No newline at end of file