From fb54fd085649eb373a63846732431b01ce2fda39 Mon Sep 17 00:00:00 2001 From: medina474 Date: Mon, 15 Sep 2025 11:35:13 +0200 Subject: [PATCH] superset --- compose.yaml | 22 ++++++++++++++++++++++ docker-entrypoint-initdb.d/1_initdb.sql | 2 ++ 2 files changed, 24 insertions(+) diff --git a/compose.yaml b/compose.yaml index 41f1de6..ecf4f33 100644 --- a/compose.yaml +++ b/compose.yaml @@ -13,5 +13,27 @@ services: ports: - 5432:5432 + bi: + image: apache/superset:latest + depends_on: + - database + environment: + SUPERSET_SECRET_KEY: ${SUPERSET_SECRET:-!ChangeMe!} + SUPERSET_LOAD_EXAMPLES: no + SUPERSET_DATABASE_URI: postgresql+psycopg2://sql:${POSTGRES_PASSWORD:-!ChangeMe!}@database:5432/superset + ports: + - "8088:8088" + volumes: + - superset_home:/app/superset_home + command: > + sh -c " + superset db upgrade && + superset fab create-admin --username admin --firstname Admin --lastname User --email admin@superset.com --password admin && + superset init && + superset run -h 0.0.0.0 -p 8088 --with-threads --reload --debugger + " + volumes: database_data: + superset_home: + \ No newline at end of file diff --git a/docker-entrypoint-initdb.d/1_initdb.sql b/docker-entrypoint-initdb.d/1_initdb.sql index f2c1adf..3d3f4ca 100644 --- a/docker-entrypoint-initdb.d/1_initdb.sql +++ b/docker-entrypoint-initdb.d/1_initdb.sql @@ -62,3 +62,5 @@ create table region ( insert into region values (1, 'Est'), (2, 'Ouest'); + +create database superset; \ No newline at end of file