Created
March 30, 2020 23:16
-
-
Save ramesh-lingappan/1a113dee9c681905fae941e39e3f792a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Pass the following environment variables while calling the command \ | |
GCP_PROJECT - the gcp project name \ | |
SERVICE_NAME - the name of the service to be deployed | |
# build | |
.PHONY: build | |
build: | |
@echo "🍳 Building docker image using Cloud build" | |
gcloud builds submit --tag gcr.io/$(GCP_PROJECT)/$(SERVICE_NAME):0.1 --project $(GCP_PROJECT) | |
# deploy the app to firebase | |
.PHONY: deploy | |
deploy: | |
make build | |
@echo "🎁 Deploying to cloud run service - demo-grpc-server" | |
gcloud run deploy $(SERVICE_NAME) --image gcr.io/$(GCP_PROJECT)/$(SERVICE_NAME):0.1 \ | |
--project $(GCP_PROJECT) \ | |
--platform managed \ | |
--allow-unauthenticated |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment