chore: clean publish artifacts and add sources

This commit is contained in:
2025-12-09 16:53:34 -06:00
parent 6138c0a60c
commit 673fa06d1e
62 changed files with 9137 additions and 0 deletions

44
reset-admin-password-mongo.sh Executable file
View File

@@ -0,0 +1,44 @@
#!/bin/bash
# MongoDB-Based Admin Password Reset Script
# No more SQLite issues!
if [ -z "$1" ]; then
echo "Usage: $0 <new-password>"
echo "Example: $0 MyNewPassword123!"
exit 1
fi
NEW_PASSWORD="$1"
EMAIL="admin@skyartshop.com"
echo "Resetting admin password in MongoDB..."
# Stop the service
echo "Stopping service..."
sudo systemctl stop skyartshop.service
# Update the password in appsettings.Production.json
echo "Updating password in configuration..."
cd /var/www/SkyArtShop
sudo sed -i "s|\"Password\": \".*\"|\"Password\": \"$NEW_PASSWORD\"|g" publish/appsettings.Production.json
# Delete the admin user from MongoDB to force recreation
echo "Removing old admin user from MongoDB..."
mongosh SkyArtShopDB --eval "db.AdminUsers.deleteMany({Email: '$EMAIL'})" --quiet
# Start the service (it will recreate the admin with new password)
echo "Starting service..."
sudo systemctl start skyartshop.service
sleep 3
# Check status
systemctl status skyartshop.service --no-pager | head -15
echo ""
echo "✅ Admin password has been reset in MongoDB!"
echo "Email: $EMAIL"
echo "Password: $NEW_PASSWORD"
echo ""
echo "You can now login at: https://skyarts.ddns.net/admin/login"