Remove unneeded scripts

This commit is contained in:
2025-08-06 20:39:59 +10:00
parent 1a5abb6c0c
commit f48ae46e22
7 changed files with 34 additions and 568 deletions
-16
View File
@@ -1,16 +0,0 @@
#!/bin/bash
set -e
echo "🚀 Building Passkey Auth..."
# Build Docker image
echo "Building Docker image..."
docker build -t passkey-auth:latest .
echo "✅ Build complete!"
echo ""
echo "Next steps:"
echo "1. Update k8s/deployment.yaml with your domain and session secret"
echo "2. Run ./scripts/deploy.sh to deploy to Kubernetes"
echo "3. Configure your nginx ingress to use passkey auth"
-33
View File
@@ -1,33 +0,0 @@
#!/bin/bash
set -e
echo "🚀 Deploying Passkey Auth to Kubernetes..."
# Check if kubectl is available
if ! command -v kubectl &> /dev/null; then
echo "❌ kubectl is not installed or not in PATH"
exit 1
fi
# Create namespace
echo "Creating namespace..."
kubectl apply -f k8s/namespace.yaml
# Deploy the application
echo "Deploying application..."
kubectl apply -f k8s/deployment.yaml
# Wait for deployment to be ready
echo "Waiting for deployment to be ready..."
kubectl wait --for=condition=available --timeout=300s deployment/passkey-auth -n passkey-auth
echo "✅ Deployment complete!"
echo ""
echo "To check the status:"
echo " kubectl get pods -n passkey-auth"
echo ""
echo "To view logs:"
echo " kubectl logs -f deployment/passkey-auth -n passkey-auth"
echo ""
echo "To configure nginx ingress, see k8s/ingress-example.yaml"
-28
View File
@@ -1,28 +0,0 @@
#!/bin/bash
set -e
echo "🔧 Starting Passkey Auth in development mode..."
# Check if Go is installed
if ! command -v go &> /dev/null; then
echo "❌ Go is not installed"
exit 1
fi
# Install dependencies
echo "Installing dependencies..."
go mod download
# Set development environment variables
export PORT=8080
export WEBAUTHN_RP_ID=localhost
export DATABASE_PATH=./dev-passkey-auth.db
export SESSION_SECRET=dev-secret-not-for-production
echo "🚀 Starting server..."
echo "Access the admin interface at: http://localhost:8080"
echo "Press Ctrl+C to stop"
# Run the application
go run main.go
-77
View File
@@ -1,77 +0,0 @@
#!/bin/bash
# GitHub Repository Setup Script
# Run this script after creating the repository on GitHub
set -e
echo "🚀 Passkey Auth - GitHub Repository Setup"
echo "=========================================="
# Check if we're in a git repository
if [ ! -d ".git" ]; then
echo "❌ Error: Not in a git repository. Run this from the project root."
exit 1
fi
# Check for uncommitted changes
if ! git diff-index --quiet HEAD --; then
echo "⚠️ Warning: You have uncommitted changes."
echo "Please commit or stash them before proceeding."
exit 1
fi
# Prompt for GitHub username and repository name
read -p "Enter your GitHub username: " GITHUB_USERNAME
read -p "Enter the repository name (default: passkey-auth): " REPO_NAME
REPO_NAME=${REPO_NAME:-passkey-auth}
# Set the repository URL
REPO_URL="https://github.com/${GITHUB_USERNAME}/${REPO_NAME}.git"
echo ""
echo "📋 Repository Details:"
echo " Username: ${GITHUB_USERNAME}"
echo " Repository: ${REPO_NAME}"
echo " URL: ${REPO_URL}"
echo ""
# Confirm before proceeding
read -p "Do you want to proceed? (y/N): " CONFIRM
if [[ ! $CONFIRM =~ ^[Yy]$ ]]; then
echo "Aborted."
exit 1
fi
echo ""
echo "⚙️ Setting up remote repository..."
# Add remote origin
if git remote get-url origin >/dev/null 2>&1; then
echo "📝 Updating existing origin remote..."
git remote set-url origin "${REPO_URL}"
else
echo "📝 Adding origin remote..."
git remote add origin "${REPO_URL}"
fi
# Set upstream branch and push
echo "📤 Pushing to GitHub..."
git branch -M main
git push -u origin main
echo ""
echo "✅ Success! Your repository has been pushed to GitHub."
echo ""
echo "🔗 Repository URL: https://github.com/${GITHUB_USERNAME}/${REPO_NAME}"
echo ""
echo "📋 Next Steps:"
echo " 1. Visit your repository on GitHub"
echo " 2. Add repository description and topics"
echo " 3. Configure branch protection rules (optional)"
echo " 4. Set up GitHub Pages for documentation (optional)"
echo " 5. Configure secrets for GitHub Actions:"
echo " - DOCKER_USERNAME (for Docker Hub publishing)"
echo " - DOCKER_PASSWORD (for Docker Hub publishing)"
echo ""
echo "🎉 Your open source project is now live!"
-65
View File
@@ -1,65 +0,0 @@
#!/bin/bash
set -e
echo "🧪 Testing Passkey Auth Build..."
# Clean previous builds
rm -f bin/passkey-auth
# Test build
echo "Building application..."
go build -o bin/passkey-auth .
if [ -f "bin/passkey-auth" ]; then
echo "✅ Build successful!"
echo "📦 Binary size: $(du -h bin/passkey-auth | cut -f1)"
else
echo "❌ Build failed!"
exit 1
fi
# Test basic functionality
echo ""
echo "🔍 Testing basic configuration..."
# Create test config
cat > test-config.yaml << EOF
server:
port: "8080"
host: "localhost"
webauthn:
rp_display_name: "Test Auth"
rp_id: "localhost"
rp_origins:
- "http://localhost:8080"
database:
path: "test.db"
cors:
allowed_origins:
- "*"
auth:
session_secret: "test-secret"
require_approval: false
allowed_emails:
- "test@example.com"
- "admin@example.com"
EOF
echo "✅ Test configuration created"
# Clean up
rm -f test-config.yaml test.db
echo ""
echo "🎉 All tests passed!"
echo ""
echo "To run the application:"
echo " ./bin/passkey-auth"
echo ""
echo "To run in development mode:"
echo " ./scripts/dev.sh"
-19
View File
@@ -1,19 +0,0 @@
#!/bin/bash
set -e
echo "🧹 Undeploying Passkey Auth from Kubernetes..."
# Delete the application
echo "Deleting application..."
kubectl delete -f k8s/deployment.yaml --ignore-not-found=true
# Delete namespace (this will also delete PVC - data will be lost!)
read -p "⚠️ This will delete all data. Are you sure? (y/N): " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
kubectl delete -f k8s/namespace.yaml --ignore-not-found=true
echo "✅ Undeployment complete!"
else
echo "❌ Cancelled"
fi