aboutsummaryrefslogtreecommitdiff
path: root/devtools/docker/compose.yaml
diff options
context:
space:
mode:
authorJulie Qiu <julie@golang.org>2021-07-18 16:12:36 -0400
committerJulie Qiu <julie@golang.org>2021-07-19 18:50:38 +0000
commitaaecac85fe7c89c6a1dc09a65ee494ae35b035e2 (patch)
treebfe98e99ce98093500ac0917a9169178917c64ee /devtools/docker/compose.yaml
parentd125a7459e81577d6100952c14bbaebd480a4d81 (diff)
downloadgo-x-pkgsite-aaecac85fe7c89c6a1dc09a65ee494ae35b035e2.tar.xz
devtools/docker: add persistent gomodcache
Everytime that docker-compose runs, it will resolve and re-download the dependency tree from scratch. A gomodcache volume is added to persist these dependencies across runs. Change-Id: I154a0efb11b8172efa12aaeb800b6a5ac72f85ec Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/335352 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Jamal Carvalho <jamal@golang.org>
Diffstat (limited to 'devtools/docker/compose.yaml')
-rw-r--r--devtools/docker/compose.yaml5
1 files changed, 5 insertions, 0 deletions
diff --git a/devtools/docker/compose.yaml b/devtools/docker/compose.yaml
index c3d5fee8..f82695e9 100644
--- a/devtools/docker/compose.yaml
+++ b/devtools/docker/compose.yaml
@@ -10,6 +10,7 @@ x-database-variables: &database-variables
GO_DISCOVERY_DATABASE_USER: ${GO_DISCOVERY_DATABASE_USER:-postgres}
x-go-variables: &go-variables
+ GOMODCACHE: /gomodcache
GO_DISCOVERY_CONFIG_DYNAMIC: ${GO_DISCOVERY_CONFIG_DYNAMIC:-/pkgsite/devtools/docker/config.yaml}
GO_DISCOVERY_LOG_LEVEL: ${GO_DISCOVERY_LOG_LEVEL:-info}
@@ -74,6 +75,7 @@ services:
- 8080:8080
volumes:
- ../../:/pkgsite
+ - gomodcache:/gomodcache
working_dir: /pkgsite
seeddb:
# This should match the version we are using on AppEngine.
@@ -95,6 +97,7 @@ services:
- 8080:8080
volumes:
- ../../:/pkgsite
+ - gomodcache:/gomodcache
working_dir: /pkgsite
db:
image: postgres:11.12
@@ -128,3 +131,5 @@ services:
- 3000:3000
environment:
- CONNECTION_TIMEOUT=120000
+volumes:
+ gomodcache: