Skip to content

Commit 0c54b83

Browse files
committed
Update script
1 parent 471f977 commit 0c54b83

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

examples-copier/project.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[[build.env]]
2+
name = "GOOGLE_BUILDABLE"
3+
value = "Dockerfile"
4+

examples-copier/scripts/deploy-cloudrun.sh

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,15 @@
44

55
set -e
66

7+
# Get the directory where this script is located
8+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
9+
# Get the project root (parent of scripts directory)
10+
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
11+
712
# Configuration
813
SERVICE_NAME="examples-copier"
914
REGION="${1:-us-central1}"
10-
ENV_FILE="env-cloudrun.yaml"
15+
ENV_FILE="$PROJECT_ROOT/env-cloudrun.yaml"
1116

1217
# Colors for output
1318
GREEN='\033[0;32m'
@@ -57,7 +62,11 @@ echo ""
5762
echo -e "${BLUE}🚀 Deploying...${NC}"
5863
echo ""
5964

60-
# Deploy to Cloud Run
65+
# Change to project root for deployment
66+
cd "$PROJECT_ROOT"
67+
68+
# Deploy to Cloud Run using Dockerfile
69+
# Note: Using --source with Dockerfile to ensure it uses Docker build, not buildpacks
6170
gcloud run deploy "$SERVICE_NAME" \
6271
--source . \
6372
--region "$REGION" \
@@ -68,7 +77,8 @@ gcloud run deploy "$SERVICE_NAME" \
6877
--memory=512Mi \
6978
--timeout=300s \
7079
--concurrency=80 \
71-
--port=8080
80+
--port=8080 \
81+
--platform=managed
7282

7383
echo ""
7484
echo -e "${GREEN}✅ Deployment complete!${NC}"

0 commit comments

Comments
 (0)