Skip to content

Instantly share code, notes, and snippets.

@thbkrkr
Created April 9, 2019 21:46
Show Gist options
  • Select an option

  • Save thbkrkr/a719e93e6f84753f94fda953c4b20c0d to your computer and use it in GitHub Desktop.

Select an option

Save thbkrkr/a719e93e6f84753f94fda953c4b20c0d to your computer and use it in GitHub Desktop.
hello gcloud run
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
}
#!/bin/sh
echo -n '{"bam":true}'
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