-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
executable file
·40 lines (32 loc) · 866 Bytes
/
Copy pathdeploy.sh
File metadata and controls
executable file
·40 lines (32 loc) · 866 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
# Exit on any error encountered
set -e
# Define colors for pretty output
GREEN='\033[0;32m'
NC='\033[0m' # No Color
# Function to log in green
log() {
echo -e "${GREEN}$1${NC}"
}
# Step 1: Delete existing Kubernetes resources
log "Deleting existing Kubernetes resources..."
kubectl delete -f k8s/ --ignore-not-found=true
log "Resources deleted successfully."
# Step 2: Build Docker images
# Build Server
log "Building Docker image for the server..."
cd server
docker build -t task-tide-server .
cd ..
log "Server image built successfully."
# Build UI
log "Building Docker image for the UI..."
cd ui
docker build -t task-tide-ui .
cd ..
log "UI image built successfully."
# Step 3: Deploy on Kubernetes
log "Deploying on Kubernetes..."
kubectl create -f k8s/
log "Deployment completed successfully."
log "All operations completed successfully."