mirror of
https://github.com/golang/go
synced 2024-11-18 12:54:44 -07:00
bdd8ae38fd
* Build Go from a given version (make.bash) * Add a /buildinfo file that describes the inputs of the build/deployment. * Use Makefile/environment variables to override Go version and Docker tag. Updates golang/go#27205. Change-Id: Ia7a88b75f9d5b2319d2381e56bc963eb53e889c7 Reviewed-on: https://go-review.googlesource.com/c/138978 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> |
||
---|---|---|
.. | ||
.gitignore | ||
app.dev.yaml | ||
app.prod.yaml | ||
appinit.go | ||
autocert.go | ||
blog.go | ||
codewalk.go | ||
dl.go | ||
doc.go | ||
Dockerfile.prod | ||
generate-index.bash | ||
godoc_test.go | ||
goroot.go | ||
handlers.go | ||
hg-git-mapping.bin | ||
index.go | ||
main.go | ||
Makefile | ||
play.go | ||
README.godoc-app | ||
regtest.bash | ||
remotesearch.go | ||
x.go |
godoc on Google App Engine ========================== Prerequisites ------------- * Google Cloud SDK https://cloud.google.com/sdk/ * Redis * Go sources under $GOROOT * Godoc sources inside $GOPATH (go get -d golang.org/x/tools/cmd/godoc) Running locally, in production mode ----------------------------------- Build the app: go build -tags golangorg Run the app: ./godoc godoc should come up at http://localhost:8080 Use the PORT environment variable to change the port: PORT=8081 ./godoc Running locally, in production mode, using Docker ------------------------------------------------- Build the app's Docker container: make docker Make sure redis is running on port 6379: $ echo PING | nc localhost 6379 +PONG ^C Run the datastore emulator: gcloud beta emulators datastore start --project golang-org In another terminal window, run the container: $(gcloud beta emulators datastore env-init) docker run --rm \ --net host \ --env GODOC_REDIS_ADDR=localhost:6379 \ --env DATASTORE_EMULATOR_HOST=$DATASTORE_EMULATOR_HOST \ --env DATASTORE_PROJECT_ID=$DATASTORE_PROJECT_ID \ gcr.io/golang-org/godoc godoc should come up at http://localhost:8080 Deploying to golang.org ----------------------- Build the image, push it to gcr.io, and deploy to Flex: make deploy Run regression tests: make regtest Go to the console to migrate traffic to the newly deployed version: https://console.cloud.google.com/appengine/versions?project=golang-org&serviceId=default&versionssize=50 Shut down any very old versions (keep at least one to roll back to, just in case). Troubleshooting --------------- Ensure the Cloud SDK is on your PATH and you have the app-engine-go component installed (gcloud components install app-engine-go) and your components are up-to-date (gcloud components update)