🍦 Soft Serve Frontend

Browse your Git repositories

build-arm64.sh

#!/bin/bash

# Quick build script for ARM64 architecture
# Run this on an ARM64 machine (like your Forgejo runner)

set -e

echo "=== Building Notes App for ARM64 ==="
echo ""

# Check architecture
ARCH=$(uname -m)
echo "Current architecture: $ARCH"

if [ "$ARCH" != "aarch64" ] && [ "$ARCH" != "arm64" ]; then
    echo "⚠️  WARNING: You're not on ARM64. This will build for x86_64."
    echo "   Your Kubernetes cluster needs ARM64 images!"
    read -p "Continue anyway? (y/N) " -n 1 -r
    echo
    if [[ ! $REPLY =~ ^[Yy]$ ]]; then
        exit 1
    fi
fi

cd "$(dirname "$0")"

echo ""
echo "Building image..."
docker build -t harbor.kratov.luiv.dev/luna_priv/notes:latest .

echo ""
read -p "Push to Harbor? (y/N) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
    echo "Logging into Harbor..."
    read -p "Username: " username
    read -s -p "Password: " password
    echo ""
    
    echo "$password" | docker login harbor.kratov.luiv.dev -u "$username" --password-stdin
    
    echo ""
    echo "Pushing image..."
    docker push harbor.kratov.luiv.dev/luna_priv/notes:latest
    
    echo ""
    echo "✅ Done! Image pushed successfully."
    echo ""
    echo "Now restart the deployment:"
    echo "  kubectl rollout restart deployment/notes-app -n default"
fi