commit | 509e10fc018f6da63e433d45afbf5c21af9480a2 | [log] [tgz] |
---|---|---|
author | Jack Lindamood <jlindamo@justin.tv> | Mon Jul 01 13:49:30 2019 -0700 |
committer | Andrew Bonventre <andybons@golang.org> | Tue Jul 30 22:11:21 2019 +0000 |
tree | 573973dd4f677a4639a4c728a24f614476773a61 | |
parent | 5fdf6019ac9accf6dfeb5bb15b7a7e80cb6411c7 [diff] |
playground: allow explicit GOPROXY variable Setting the PLAY_GOPROXY variable of the playground modifies where the playground fetches module information from. This allows users to install the playground inside their company VPN and use private modules. The variable isn't named "GOPROXY" to not confuse which context the URL is used for. The name PLAY_* is adopted from the existing env variable ALLOW_PLAY_MODULE_DOWNLOADS. Fixes golang/go#32740 Change-Id: Idcd0530c1c28342414e0bc5439fca6a2272e1eaa Reviewed-on: https://go-review.googlesource.com/c/playground/+/184558 Reviewed-by: Andrew Bonventre <andybons@golang.org>
This subrepository holds the source for the Go playground: https://play.golang.org/
# build the image docker build -t playground .
docker run --name=play --rm -d -p 8080:8080 playground # run some Go code cat /path/to/code.go | go run client.go | curl -s --upload-file - localhost:8080/compile
Playground releases automatically triggered when new Go repository tags are pushed to GitHub, or when master is pushed on the playground repository.
For details, see deploy/go_trigger.json, deploy/playground_trigger.json, and deploy/deploy.json.
After making changes to trigger configuration, update configuration by running the following Make target:
make update-cloudbuild-trigger
The Cloud Build configuration will always build and deploy with the latest supported release of Go.
gcloud builds submit --config deploy/deploy.json .
Building the playground Docker container takes more than the default 10 minute time limit of cloud build, so increase its timeout first (note, app/cloud_build_timeout
is a global configuration value):
gcloud config set app/cloud_build_timeout 1200 # 20 mins
Alternatively, to avoid Cloud Build and build locally:
make docker docker tag playground:latest gcr.io/golang-org/playground:latest docker push gcr.io/golang-org/playground:latest gcloud --project=golang-org --account=you@google.com app deploy app.yaml --image-url=gcr.io/golang-org/playground:latest
Then:
gcloud --project=golang-org --account=you@google.com app deploy app.yaml
To submit changes to this repository, see https://golang.org/doc/contribute.html.