https://github.com/twogg-git/go-gcp-cloudshell
Simple GO endpoint deployed using GCP cloud-run-button
https://github.com/twogg-git/go-gcp-cloudshell
gcp gcp-appengine-std golang
Last synced: 10 months ago
JSON representation
Simple GO endpoint deployed using GCP cloud-run-button
- Host: GitHub
- URL: https://github.com/twogg-git/go-gcp-cloudshell
- Owner: twogg-git
- Created: 2019-08-06T21:31:40.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-09-22T02:21:28.000Z (over 6 years ago)
- Last Synced: 2025-03-23T02:01:53.165Z (about 1 year ago)
- Topics: gcp, gcp-appengine-std, golang
- Language: Go
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GO + GCP
Simple GO endpoints deployed in Google Cloud Platform directy from GitHub clicking just one button!
[](https://console.cloud.google.com/cloudshell/editor?shellonly=true&cloudshell_image=gcr.io/cloudrun/button&cloudshell_git_repo=https://github.com/twogg-git/go-gcp-cloudshell.git)
### Testing locally
```sh
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
```sh
localhost:8181
localhost:8181/time
localhost:8181/version
```
### Docker + Go commands
```sh
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
```sh
docker rm -f go-endpoints
```
[GCP Cloud run button repo](https://github.com/GoogleCloudPlatform/cloud-run-button#add-the-cloud-run-button-to-your-repos-readme)