Finish packaging and change to src-based packaging layout, replace caddy with haproxy for performance, and update docker-compose and Dockerfiles for new packaging.
This commit is contained in:
parent
959b06c425
commit
762361a21b
210 changed files with 235 additions and 168 deletions
|
|
@ -2,18 +2,23 @@
|
|||
# Exit immediately if any command exits with a non-zero status.
|
||||
set -e
|
||||
|
||||
# Reset the database and migrations.
|
||||
echo "Resetting database and migrations... "
|
||||
echo "Remaking migrations..."
|
||||
docker compose up -d
|
||||
find . -path "*/migrations/0*.py" -delete
|
||||
docker compose exec -it web bash -c "django-admin makemigrations --noinput"
|
||||
|
||||
echo "Resetting database... "
|
||||
docker compose down \
|
||||
&& docker volume prune -a --filter label=db_is_resettable_via_script \
|
||||
&& find . -path "*/migrations/00*.py" -delete \
|
||||
&& docker volume rm -f pkmntradeclub_postgres_data \
|
||||
&& docker compose up -d
|
||||
|
||||
# Wait for the database to be ready.
|
||||
echo "Waiting for the database to be ready..."
|
||||
echo "Waiting for the database to be ready, and migrations to be autorun..."
|
||||
sleep 10
|
||||
|
||||
echo "Loading seed data..."
|
||||
docker compose exec -it web bash -c "django-admin loaddata /seed/0*"
|
||||
|
||||
echo "Done & Started!"
|
||||
docker compose down
|
||||
|
||||
echo "Done!"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue