/go-gcp-cloudshell

Simple GO endpoint deployed using GCP cloud-run-button

Primary LanguageGo

GO + GCP

Simple GO endpoints deployed in Google Cloud Platform directy from GitHub clicking just one button!

Run on Google Cloud

Testing locally

docker run -v $pwd:/go/src/app -p 8181:8080 -d --name go-endpoints golang:1.8 go run src/app/main.go

docker run -v $(pwd):/go/src/app --rm --name go-endpoints golang:1.8 go run main.go

Endpoints available

localhost:8181
localhost:8181/time
localhost:8181/version

Docker + Go commands

docker run -v $pwd:/go/src/app -p 8181:8080 -d --name go-endpoints golang:1.8 /bin/bash -c "go run src/app/main.go"

docker run -v $pwd:/go/src/app -p 8181:8080 -d --name go-endpoints golang:1.8 /bin/bash -c "cd src/app;go get -v ./...;go run /src/app/main.go"

Cleaning up

docker rm -f go-endpoints

GCP Cloud run button repo