devtools/docker: add x-go-variables
Shared variables for Go servers are moved to x-go-variables.
Also delete the unused PORT variable on the seeddb container.
Trust: Julie Qiu
Run-TryBot: Julie Qiu
TryBot-Result: kokoro
@@ -9,6 +9,10 @@ x-database-variables: &database-variables
GO_DISCOVERY_DATABASE_PASSWORD: ${GO_DISCOVERY_DATABASE_PASSWORD:-postgres}
GO_DISCOVERY_DATABASE_USER: ${GO_DISCOVERY_DATABASE_USER:-postgres}
+x-go-variables: &go-variables
+ GO_DISCOVERY_CONFIG_DYNAMIC: ${GO_DISCOVERY_CONFIG_DYNAMIC:-/pkgsite/devtools/docker/config.yaml}
+ GO_DISCOVERY_LOG_LEVEL: ${GO_DISCOVERY_LOG_LEVEL:-info}
+
services:
allbash:
# Allocate a pseudo-tty, which sets the TERM
@@ -27,6 +31,7 @@ services:
image: golang:1.15.5
environment:
<<: *database-variables
+ <<: *go-variables
GO_DISCOVERY_TESTDB: ${GO_DISCOVERY_TESTDB:-true}
# TERM is set to xterm-256color for use by devtools/lib.sh.
TERM: xterm-256color
@@ -62,8 +67,7 @@ services:
go run ./cmd/frontend -host=0.0.0.0:8080"
environment:
<<: *database-variables
- GO_DISCOVERY_LOG_LEVEL: ${GO_DISCOVERY_LOG_LEVEL:-info}
- GO_DISCOVERY_CONFIG_DYNAMIC: /pkgsite/devtools/docker/config.yaml
+ <<: *go-variables
PORT: 8080
WAITFORIT_TIMEOUT: 300
ports:
@@ -85,8 +89,7 @@ services:
go run ./devtools/cmd/seeddb/main.go -seed ${GO_DISCOVERY_SEED_DB_FILE:-seed.txt}"
environment:
<<: *database-variables
- GO_DISCOVERY_LOG_LEVEL: ${GO_DISCOVERY_LOG_LEVEL:-info}
- PORT: 8080
+ <<: *go-variables
WAITFORIT_TIMEOUT: 300
ports:
- 8080:8080
