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

Wait for Faros DB and Hasura/Metabase/n8n databases to exist before attempting to bring up other services #94

Merged
merged 3 commits into from
Apr 4, 2022
Merged
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
15 changes: 12 additions & 3 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,21 @@ services:
HASURA_GRAPHQL_ADMIN_SECRET: ${HASURA_GRAPHQL_ADMIN_SECRET?}
METABASE_DB_NAME: ${METABASE_DB_NAME?}
N8N_DB_NAME: ${N8N_DB_NAME?}
healthcheck:
test: ["CMD", "psql", "-d", "postgres://${FAROS_CONFIG_DB_USER?}:${FAROS_CONFIG_DB_PASSWORD?}@${FAROS_CONFIG_DB_HOST?}:${FAROS_CONFIG_DB_PORT?}/${N8N_DB_NAME?}", "-c", "SELECT 1"]
interval: 15s
timeout: 5s
start_period: 30s
retries: 5
hasura:
profiles: ["default"]
image: hasura/graphql-engine:${HASURA_VERSION?}
container_name: hasura
ports:
- ${HASURA_PORT?}:8080
depends_on:
- faros-init
faros-init:
condition: service_healthy
restart: unless-stopped
environment:
HASURA_GRAPHQL_ADMIN_SECRET: ${HASURA_GRAPHQL_ADMIN_SECRET?}
Expand All @@ -101,7 +108,8 @@ services:
ports:
- ${METABASE_PORT?}:3000
depends_on:
- faros-init
faros-init:
condition: service_healthy
restart: unless-stopped
environment:
MB_ANON_TRACKING_ENABLED: "false"
Expand All @@ -121,7 +129,8 @@ services:
ports:
- ${N8N_PORT?}:5678
depends_on:
- faros-init
faros-init:
condition: service_healthy
restart: unless-stopped
environment:
DB_TYPE: postgresdb
Expand Down