Skip to content

Commit

Permalink
Add deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
nownabe committed Aug 14, 2023
1 parent 66860bf commit c3b5b55
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
37 changes: 37 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env bash

set -o errexit
set -o nounset
set -o pipefail

region="$1"
root="$(cd "$(dirname "${BASH_SOURCE:-$0}")" && pwd)"

deploy_redirector() {
cd "$root/redirector"
gcloud app deploy

}

gcloud components install alpha --quiet
gcloud services enable \
iap.googleapis.com \
appengine.googleapis.com \
cloudresourcemanager.googleapis.com

gcloud app create --region "$region"
gcloud alpha firestore databases update --type=firestore-native --quiet

cd "$root/redirector"
gcloud app deploy --quiet

cd "$root/api"
gcloud app deploy --quiet

cd "$root"
gcloud app deploy dispatch.yaml --quiet

gcloud iap settings set \
iap-settings.yaml \
--resource-type=app-engine \
--project="$(gcloud config get project)"
3 changes: 3 additions & 0 deletions iap-settings.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessSettings:
corsSettings:
allowHttpOptions: true

0 comments on commit c3b5b55

Please sign in to comment.