diff --git a/compose.yaml b/compose.yaml index 5fd8b0d..26badc1 100644 --- a/compose.yaml +++ b/compose.yaml @@ -12,11 +12,18 @@ services: - ./data:/tmp:Z ports: - 5432:5432 + healthcheck: + test: ["CMD", "pg_isready", "--username", "${COMPOSE_PROJECT_NAME}", "--dbname", "${COMPOSE_PROJECT_NAME}"] + interval: 10s + timeout: 5s + retries: 5 + start_period: 10s bi: image: apache/superset:3.1.3 depends_on: - - database + database: + condition: service_healthy environment: SUPERSET_CONFIG_PATH: /app/pythonpath/superset_config.py SUPERSET_SECRET_KEY: ${SUPERSET_SECRET:-!ChangeMe!}