-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGCP_Deployment_Script2.sh
More file actions
executable file
·31 lines (28 loc) · 1.26 KB
/
Copy pathGCP_Deployment_Script2.sh
File metadata and controls
executable file
·31 lines (28 loc) · 1.26 KB
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
#!/bin/bash
# ---------------------------------------------------------------------------------- #
# --- Check if gcloud is installed --- #
# ---------------------------------------------------------------------------------- #
if ! command -v gcloud >/dev/null 2>&1; then
echo "❌ ERROR: gcloud CLI not found. Please install it first."
exit 1
fi
# ---------------------------------------------------------------------------------- #
# --- Configuration & Vars --- #
# ---------------------------------------------------------------------------------- #
REGION="europe-west1"
SERVICE_NAME="catia-service"
echo "🚀 Deploying $SERVICE_NAME to Google Cloud Run ($REGION)..."
if gcloud run deploy $SERVICE_NAME \
--source . \
--region $REGION \
--allow-unauthenticated \
--port 8080
then
echo "✅ Deployment complete! Your site is live."
else
echo "----------------------------------------------------------------------"
echo "❌ ERROR: Deployment failed during the Cloud Build process."
echo "Check the link in the logs above to see the specific error."
echo "----------------------------------------------------------------------"
exit 2
fi