From 977edda75c10ae2a8c2189cdfa2bca2e3eca79ea Mon Sep 17 00:00:00 2001 From: Julie Qiu Date: Wed, 16 Jun 2021 16:18:56 -0400 Subject: devtools: add all.bash to docker-compose all.bash can now be run using docker-compose. Change-Id: I2b365fd7911bb61f52f1fc7c9c9d594fb4c6c731 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/328749 Trust: Julie Qiu Run-TryBot: Julie Qiu Reviewed-by: Jonathan Amsterdam --- devtools/docker/docker-compose.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'devtools/docker') diff --git a/devtools/docker/docker-compose.yaml b/devtools/docker/docker-compose.yaml index 269496fb..4de57e4e 100644 --- a/devtools/docker/docker-compose.yaml +++ b/devtools/docker/docker-compose.yaml @@ -3,6 +3,33 @@ # license that can be found in the LICENSE file. version: '3' services: + allbash: + # Allocate a pseudo-tty, which sets the TERM + # environment variable to xterm. + # See + # https://docs.docker.com/engine/reference/run/#env-environment-variables and + # https://www.gnu.org/software/gettext/manual/html_node/The-TERM-variable.html. + # This is necessary because devtools/lib.sh uses tput. + tty: + true + # allbash depends only on db, since the Go tests will set up its own + # test databases. + depends_on: + - db + # This should match the version we are using on AppEngine. + image: golang:1.15.5 + environment: + - GO_DISCOVERY_TESTDB=true + - GO_DISCOVERY_DATABASE_TEST_PORT=5432 + - GO_DISCOVERY_DATABASE_TEST_HOST=db + - GO_DISCOVERY_DATABASE_TEST_USER=postgres + - GO_DISCOVERY_DATABASE_TEST_PASSWORD=postgres + # TERM is set to xterm-256color for use by devtools/lib.sh. + - TERM=xterm-256color + entrypoint: "./third_party/wait-for-it/wait-for-it.sh db:5432 -- ./all.bash" + volumes: + - ../../:/pkgsite + working_dir: /pkgsite e2e: image: node:14.17.0 depends_on: @@ -27,6 +54,7 @@ services: environment: - CONNECTION_TIMEOUT=120000 frontend: + # This should match the version we are using on AppEngine. image: golang:1.15.5 depends_on: - migrate -- cgit v1.3