commit | 046e86367174dcb1c04c9492aa22912eb9c56813 | [log] [tgz] |
---|---|---|
author | Brad Fitzpatrick <bradfitz@golang.org> | Thu May 09 20:48:49 2019 +0000 |
committer | Brad Fitzpatrick <bradfitz@golang.org> | Fri May 10 18:44:35 2019 +0000 |
tree | 6c215cea9ac6a765068e76bc5b35c31f3ad1810d | |
parent | 33ccd9b32303a177e74464152f26b6a2704757d8 [diff] |
playground: support third-party imports (off by default for now) Also, modernize the Dockerfile while I'm at it, using multi-stage builds more aggressively, and stop using gitlock (golang/go#26872) and switch to using Go modules to build the playground. (This also turns the playground into a module.) Updates golang/go#31944 Change-Id: Ic6f6152469f1930fd04180a3d1e63ed92ea2cfbd Reviewed-on: https://go-review.googlesource.com/c/playground/+/176317 Reviewed-by: Yury Smolsky <yury@smolsky.by>
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
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
Then:
gcloud --project=golang-org --account=person@example.com app deploy app.yaml
To submit changes to this repository, see https://golang.org/doc/contribute.html.