devtools/docker: set default GOPATH
If $GOPATH is not set, default to $HOME/go in the docker-compose setup.
Trust: Julie Qiu
@@ -31,7 +31,7 @@ services:
entrypoint: "./third_party/wait-for-it/wait-for-it.sh db:5432 -- ./all.bash"
volumes:
- ../../:/pkgsite
- - $GOPATH/pkg/mod:/gomodcache
+ - ${GOPATH:-$HOME/go}/pkg/mod:/gomodcache
working_dir: /pkgsite
e2e:
image: node:14.17.0
@@ -76,7 +76,7 @@ services:
- 8080:8080
volumes:
- ../../:/pkgsite
- - $GOPATH/pkg/mod:/gomodcache
+ - ${GOPATH:-$HOME/go}/pkg/mod:/gomodcache
working_dir: /pkgsite
seeddb:
# This should match the version we are using on AppEngine.
@@ -102,7 +102,7 @@ services:
- 8080:8080
volumes:
- ../../:/pkgsite
- - $GOPATH/pkg/mod:/gomodcache
+ - ${GOPATH:-$HOME/go}/pkg/mod:/gomodcache
working_dir: /pkgsite
migrate:
depends_on:
