Created
April 9, 2019 21:46
-
-
Save thbkrkr/a719e93e6f84753f94fda953c4b20c0d to your computer and use it in GitHub Desktop.
hello gcloud run
This file contains hidden or 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
| grun() { | |
| [[ "$PROJECT_ID" == "" ]] && echo "PROJECT_ID not set" && return | |
| [[ ! -f Dockerfile ]] && echo "Dockerfile not found" && return | |
| local name=$(basename $(pwd)) | |
| local image=gcr.io/$PROJECT_ID/$name | |
| docker build -t $image . | |
| docker push $image | |
| gcloud beta run deploy --allow-unauthenticated --image $image $name | |
| } |
This file contains hidden or 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
| #!/bin/sh | |
| echo -n '{"bam":true}' |
This file contains hidden or 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
| FROM krkr/apish | |
| COPY bim.sh /api/bim.sh | |
| CMD ["/go-apish", "--port", "8080"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment