Skip to content

Commit

Permalink
fix: terraboard crash at compose startup if db isn't fully initialized (
Browse files Browse the repository at this point in the history
  • Loading branch information
hbollon committed Jun 21, 2021
1 parent 630ce3f commit a8e6bdd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
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

0 comments on commit a8e6bdd

Please sign in to comment.