Files
pos-system/scripts/deploy/deploy-prod.sh
Ho Ngoc Hai 29c40ea681 Update project documentation and scripts for improved setup and bilingual support
- Enhanced `README.md` with a quick start guide and detailed project structure.
- Updated `SETUP_GUIDE.md` by removing it as it was redundant.
- Improved `local-development.md` and `development.md` with clearer instructions for database migrations.
- Added bilingual comments in various scripts for better understanding and usability.
- Updated `.gitignore` to include specific build scripts while ignoring others.
- Enhanced `scripts` for database management, including backup and seeding functionalities with bilingual support.
2025-12-27 10:12:46 +07:00

32 lines
958 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/auth-service -n production
echo "✅ Deployment completed!"