haumdaucher_de/deploy.sh

29 lines
743 B
Bash
Executable File

#!/bin/bash
# Configuration
NAMESPACE="haumdaucher"
REGISTRY="registry.moritzgraf.de"
IMAGE_BASE_NAME="haumdaucher-website"
IMAGE_NAME="$REGISTRY/$IMAGE_BASE_NAME"
TAG="latest"
echo "🚀 Starting deployment for Haumdaucher..."
# Create namespace if it doesn't exist
kubectl create namespace $NAMESPACE --dry-run=client -o yaml | kubectl apply -f -
# Build the docker image
echo "📦 Building Docker image..."
docker build -t $IMAGE_NAME:$TAG .
# Push the docker image
echo "📤 Pushing Docker image to $REGISTRY..."
docker push $IMAGE_NAME:$TAG
# Apply manifests
echo "🎡 Applying Kubernetes manifests..."
kubectl apply -f k8s-manifests.yaml
echo "✅ Deployment complete!"
echo "Check status with: kubectl get pods -n $NAMESPACE"