Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: terraboard crash at compose startup if db isn't fully initialized #174

Merged
merged 1 commit into from Jun 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 8 additions & 2 deletions docker-compose.yml
@@ -1,5 +1,5 @@
---
version: '3'
version: "3.8"
services:
terraboard:
build:
Expand All @@ -16,7 +16,8 @@ services:
DB_SSLMODE: disable
GODEBUG: netdns=go
depends_on:
- "db"
db:
condition: service_healthy
volumes:
- ./static:/static:ro
ports:
Expand All @@ -30,6 +31,11 @@ services:
POSTGRES_DB: gorm
volumes:
- tb-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5

volumes:
tb-data: {}
13 changes: 10 additions & 3 deletions test/docker-compose.yml
@@ -1,5 +1,5 @@
---
version: "3"
version: "3.8"
services:
terraboard-dev:
build:
Expand All @@ -19,8 +19,10 @@ services:
DB_SSLMODE: disable
GODEBUG: netdns=go
depends_on:
- "db"
- "minio"
db:
condition: service_healthy
minio:
condition: service_started
volumes:
- ../static:/static:ro
ports:
Expand Down Expand Up @@ -48,6 +50,11 @@ services:
POSTGRES_DB: gorm
volumes:
- tb-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5

pgadmin:
container_name: pgadmin4_container
Expand Down