- Renamed auth-service to iam-service across various files for consistency. - Updated deployment workflows, database migration scripts, and documentation to reflect the service name change. - Enhanced bilingual documentation for clarity on the new service structure and usage. - Removed outdated references to auth-service in scripts and configuration files to streamline the project structure.
32 lines
957 B
Bash
Executable File
32 lines
957 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
# EN: Warn user about production deployment
|
|
# VI: Cảnh báo người dùng về việc deploy lên production
|
|
echo "⚠️ WARNING: You are about to deploy to PRODUCTION!"
|
|
read -p "Are you sure? (yes/no): " confirm
|
|
|
|
# EN: Check user confirmation
|
|
# VI: Kiểm tra xác nhận của người dùng
|
|
if [ "$confirm" != "yes" ]; then
|
|
echo "Deployment cancelled"
|
|
exit 1
|
|
fi
|
|
|
|
echo "🚀 Deploying to production..."
|
|
|
|
# EN: Verify KUBECONFIG environment variable is set
|
|
# VI: Xác minh biến môi trường KUBECONFIG đã được thiết lập
|
|
if [ -z "$KUBECONFIG" ]; then
|
|
echo "❌ KUBECONFIG environment variable not set"
|
|
exit 1
|
|
fi
|
|
|
|
# EN: Apply Kubernetes configurations and wait for rollout
|
|
# VI: Áp dụng cấu hình Kubernetes và đợi quá trình rollout hoàn tất
|
|
kubectl apply -f deployments/production/kubernetes/
|
|
kubectl rollout status deployment/iam-service -n production
|
|
|
|
echo "✅ Deployment completed!"
|