Merge pull request #2281 from hughrun/resetdb

fix resetdb
This commit is contained in:
Mouse Reeve 2022-08-27 09:14:21 -07:00 committed by GitHub
commit c902301d82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

14
bw-dev
View file

@ -84,16 +84,14 @@ case "$CMD" in
;;
resetdb)
prod_error
clean
# Start just the DB so no one else is using it
docker-compose up --build -d db
rundb dropdb -U ${POSTGRES_USER} ${POSTGRES_DB}
rundb createdb -U ${POSTGRES_USER} ${POSTGRES_DB}
# Now start up web so we can run the migrations
docker-compose up --build -d web
docker-compose rm -svf
docker volume rm -f bookwyrm_media_volume bookwyrm_pgdata bookwyrm_redis_activity_data bookwyrm_redis_broker_data bookwyrm_static_volume
docker-compose build
migrate
migrate django_celery_beat
initdb
clean
runweb python manage.py collectstatic --no-input
admin_code
;;
makemigrations)
prod_error