blob: c1523af87b86e04e55be40306b7a22b9b5955873 [file] [log] [blame]
godoc on Google App Engine
* Google Cloud SDK
* Redis
* Go sources under $GOROOT
* Godoc sources inside $GOPATH
(go get -d
Running locally, in production mode
Build the app:
go build -tags golangorg
Run the app:
godoc should come up at http://localhost:8080
Use the PORT environment variable to change the port:
PORT=8081 ./golangorg
Running locally, in production mode, using Docker
Build the app's Docker container:
make docker-build
Make sure redis is running on port 6379:
$ echo PING | nc localhost 6379
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 \
godoc should come up at http://localhost:8080
Deploying to
Make sure you're signed in to gcloud:
gcloud auth login
Build the image, push it to, and deploy to Flex:
make cloud-build deploy
Point the load balancer to the newly deployed version:
(This also runs regression tests)
make publish
Stop and/or delete down any very old versions. (Stopped versions can be re-started.)
Keep at least one older verson to roll back to, just in case.
You can also migrate traffic to the new version via this UI.
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)