Skip to content

Commit

Permalink
GCP one click deployment postcreate hook
Browse files Browse the repository at this point in the history
  • Loading branch information
EugeneLightsOn committed May 30, 2024
1 parent e8802d1 commit 4df41fd
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions gcp_postcreate_hook.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,5 @@ echo "Project $GOOGLE_CLOUD_PROJECT"
echo "Service $K_SERVICE"
echo "URL $SERVICE_URL"
gcloud run services describe toolkit-deploy --project oss-toolkit --region us-central1 --format export > service.yaml
sed -i '/startupProbe:/,/timeoutSeconds: 240/c\
startupProbe:\
timeoutSeconds: 1\
periodSeconds: 1\
failureThreshold: 120\
httpGet:\
path: /api/health\
port: 4000' service.yam
gcloud run services replace service.yaml --project oss-toolkit --region us-central1
sed -i '/startupProbe:/,/timeoutSeconds: 240/c\ startupProbe:\ timeoutSeconds: 1\ periodSeconds: 1\ failureThreshold: 120\ httpGet:\ path: /api/health\ port: 4000' service.yaml
#gcloud run services replace service.yaml --project oss-toolkit --region us-central1

0 comments on commit 4df41fd

Please sign in to comment.