You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Simple GO endpoints deployed in Google Cloud Platform directy from GitHub clicking just one button!
3
3
4
+
[](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)
5
+
6
+
### Testing locally
4
7
```sh
5
-
docker run -v $pwd:/go/src/app -p 8181:8080 -d --name go-light golang:1.8 go run src/app/main.go
8
+
docker run -v $pwd:/go/src/app -p 8181:8080 -d --name go-endpoints golang:1.8 go run src/app/main.go
6
9
7
-
docker run -v $(pwd):/go/src/app --rm --name testgo golang:1.8 go run main.go
10
+
docker run -v $(pwd):/go/src/app --rm --name go-endpoints golang:1.8 go run main.go
8
11
```
9
12
10
-
13
+
### Endpoints available
11
14
```sh
12
15
localhost:8181
13
16
localhost:8181/time
14
17
localhost:8181/version
15
18
```
16
19
20
+
### Docker + Go commands
17
21
```sh
18
-
docker run -v $pwd:/go/src/app -p 8181:8080 -d --name go-light golang:1.8 /bin/bash -c "go run src/app/main.go"
19
-
```
22
+
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"
20
23
21
-
```sh
22
-
docker run -v $pwd:/go/src/app -p 8181:8080 -d --name go-light golang:1.8 /bin/bash -c "cd src/app;go get -v ./...;go run /src/app/main.go"
24
+
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"
23
25
```
24
-
26
+
### Cleaning up
25
27
```sh
26
-
docker rm -f go-light
28
+
docker rm -f go-endpoints
27
29
```
28
30
29
-
[](https://console.cloud.google.com/cloudshell/editor?shellonly=true&cloudshell_image=gcr.io/cloudrun/button&cloudshell_git_repo=https://github.com/twogg-git/go-light.git)
0 commit comments