Major refactoring of build_deploy action, along with docker building and packaging improvements. Added no_signups and other .env improvements. There is no longer a separate .env.dev, both use .env now.

This commit is contained in:
badblocks 2025-05-18 11:27:59 -07:00
parent 76b2becc24
commit 6f57699c8d
28 changed files with 795 additions and 328 deletions

View file

@ -3,18 +3,23 @@
set -e
echo "Remaking migrations..."
docker compose up -d
find . -path "*/migrations/0*.py" -delete
docker compose exec -it web bash -c "django-admin makemigrations --noinput"
set -a
source .env
set +a
uv run manage.py makemigrations --noinput
echo "Resetting database... "
docker compose down \
&& docker volume rm -f pkmntradeclub_postgres_data \
&& docker compose up -d
&& ./scripts/rebuild-and-run.sh
# Wait for the database to be ready.
echo "Waiting for the database to be ready, and migrations to be autorun..."
sleep 10
echo "Waiting 15 seconds for the database to be ready, and migrations to be autorun..."
sleep 15
echo "Creating cache table..."
docker compose exec -it web bash -c "django-admin createcachetable django_cache"
echo "Loading seed data..."
docker compose exec -it web bash -c "django-admin loaddata /seed/0*"