automated push from the terminal

This commit is contained in:
Software Shinobi
2026-02-09 11:38:30 -05:00
parent 5539582a92
commit 189c6b7b26
3 changed files with 21 additions and 87 deletions

View File

@@ -1,52 +1,13 @@
#!/bin/bash
##
set -e
set -x
set -x
##
reset
clear
##
# 1. Shut down existing containers
docker compose down --remove-orphans
docker compose up -d
# 2. Build and start containers in the background
# The Dockerfile's CMD will handle migrations and runserver automatically.
docker compose up -d --build
sleep 8
########
###docker-compose -f postgres.yaml pull
#python3 manage.py dumpdata
## This will IRREVERSIBLY DESTROY all data currently in the "maverickdb" database, and return each table to an empty state.
### python3 manage.py flush
### python3 manage.py sqlflush
#python3 manage.py sqlmigrate
##python3 manage.py sqlsequencereset
#python3 manage.py generateschema
python3 manage.py makemigrations
python3 manage.py migrate
#python3 manage.py squashmigrations bikes
#python3 manage.py optimizemigration
python3 manage.py runserver 0.0.0.0:8888
# 3. (Optional) Check the logs to ensure the migrations finished successfully
docker compose logs -f