diff options
| author | Julie Qiu <julie@golang.org> | 2021-07-16 17:12:49 -0400 |
|---|---|---|
| committer | Julie Qiu <julie@golang.org> | 2021-07-19 13:56:11 +0000 |
| commit | 288a8c46dfff3036d337f4f65d0cf974046a7b43 (patch) | |
| tree | 4e7461f16a532281f707c1f4d7e1a37a60d6cbcf /devtools/docker | |
| parent | 356ad6387e58365c50a0d471f6e8605006308e35 (diff) | |
| download | go-x-pkgsite-288a8c46dfff3036d337f4f65d0cf974046a7b43.tar.xz | |
devtools,tests: delete migrate container
devtools/cmd/db can now be used to run migrate in the seeddb and
frontend containers, so a separate migrate service is no longer
necessary.
Change-Id: I938f259ff1e6efe53ee0f93e5740911dc5e14fb5
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/335139
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Diffstat (limited to 'devtools/docker')
| -rw-r--r-- | devtools/docker/compose.yaml | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/devtools/docker/compose.yaml b/devtools/docker/compose.yaml index c1a7248e..c60913c1 100644 --- a/devtools/docker/compose.yaml +++ b/devtools/docker/compose.yaml @@ -51,9 +51,10 @@ services: # This should match the version we are using on AppEngine. image: golang:1.15.5 depends_on: - - migrate + - db command: bash -c " ./third_party/wait-for-it/wait-for-it.sh db:5432 -- + go run ./devtools/cmd/db/main.go migrate && go run ./cmd/frontend -host=0.0.0.0:8080" environment: - GO_DISCOVERY_DATABASE_HOST=db @@ -73,12 +74,13 @@ services: # This should match the version we are using on AppEngine. image: golang:1.15.5 depends_on: - - migrate + - db # Note: technically we should check that migrations have completed before # running seeddb, but in general, migrations will have completed by the # time seeddb runs. If this ends up being flaky, we should add a check here. command: bash -c " ./third_party/wait-for-it/wait-for-it.sh db:5432 -- + go run ./devtools/cmd/db/main.go migrate && go run ./devtools/cmd/seeddb/main.go -seed ${GO_DISCOVERY_SEED_DB_FILE:-seed.txt}" environment: - GO_DISCOVERY_DATABASE_HOST=db @@ -93,21 +95,6 @@ services: volumes: - ../../:/pkgsite working_dir: /pkgsite - migrate: - depends_on: - - db - image: migrate/migrate:v4.14.1 - entrypoint: "" - command: sh -c " - apk add --no-cache bash && - ./third_party/wait-for-it/wait-for-it.sh db:5432 -- - migrate -path /pkgsite/migrations - -database postgres://${GO_DISCOVERY_DATABASE_USER:-postgres}:${GO_DISCOVERY_DATABASE_PASSWORD:-postgres}@db:5432/${GO_DISCOVERY_DATABASE_NAME:-discovery-db}?sslmode=disable up" - environment: - - WAITFORIT_TIMEOUT=300 - volumes: - - ../../:/pkgsite - working_dir: /pkgsite db: image: postgres:11.12 environment: |
