Latest links updates (#1976, #2000) (#2060)

This commit is contained in:
daveoconnor
2026-02-20 12:41:54 -08:00
committed by GitHub
parent 53a1a94ba1
commit 925bb7d942
24 changed files with 945 additions and 21 deletions

View File

@@ -184,13 +184,7 @@ download_latest_db_dump() {
docker compose exec db bash -c "pg_restore -U $DB_USER -d $DB_NAME -v --no-owner --no-privileges /tmp/$DUMP_FILENAME"
# apply any migrations newer than our dumped database
docker compose exec web bash -c "./manage.py migrate"
# update the database to delete all rows from socialaccount_social app, which need to be configured differently locally
echo "Deleting all rows from socialaccount_socialapp table and setting fake passwords..."
docker compose exec web bash -c "./manage.py shell -c 'from allauth.socialaccount.models import SocialApp; SocialApp.objects.all().delete()'"
just manage "set_fake_passwords --password=test"
echo 'from django.contrib.auth import get_user_model; u=get_user_model().objects.get(email="superadmin@boost.org"); u.set_password("foobarone"); u.save()' | docker compose exec -T web python manage.py shell
echo "Database restored successfully from $DUMP_FILENAME"
return 0
}
@@ -199,6 +193,11 @@ if [ "${skip_web_option:-}" != "yes" ]; then
echo "Failed to download and restore latest database dump";
exit 1;
}
docker compose exec web bash -c "DJANGO_SUPERUSER_USERNAME=superadmin DJANGO_SUPERUSER_EMAIL=superadmin@boost.org DJANGO_SUPERUSER_PASSWORD=foobarone ./manage.py createsuperuser --noinput" || true
# update the database to delete all rows from socialaccount_social app, which need to be configured differently locally
echo "Deleting all rows from socialaccount_socialapp table and setting fake passwords..."
docker compose exec web bash -c "./manage.py shell -c 'from allauth.socialaccount.models import SocialApp; SocialApp.objects.all().delete()'"
just manage "set_fake_passwords --password=test"
fi
if [ "${skip_lists_option:-}" != "yes" ]; then