Apache Superset

This commit is contained in:
2025-09-16 11:53:04 +02:00
parent 292d59d393
commit ec27dedaf7
3 changed files with 13 additions and 4 deletions

View File

@@ -18,13 +18,14 @@ services:
depends_on: depends_on:
- database - database
environment: environment:
SUPERSET_CONFIG_PATH: /app/pythonpath/superset_config.py
SUPERSET_SECRET_KEY: ${SUPERSET_SECRET:-!ChangeMe!} SUPERSET_SECRET_KEY: ${SUPERSET_SECRET:-!ChangeMe!}
SUPERSET_LOAD_EXAMPLES: no SUPERSET_LOAD_EXAMPLES: no
SUPERSET_DATABASE_URI: postgresql+psycopg2://sql:${POSTGRES_PASSWORD:-!ChangeMe!}@database:5432/superset
ports: ports:
- "8088:8088" - "8088:8088"
volumes: volumes:
- superset_home:/app/superset_home - superset_home:/app/superset_home
- ./superset_config.py:/app/pythonpath/superset_config.py
command: > command: >
sh -c " sh -c "
superset db upgrade && superset db upgrade &&
@@ -36,4 +37,3 @@ services:
volumes: volumes:
database_data: database_data:
superset_home: superset_home:

View File

@@ -63,4 +63,11 @@ create table region (
insert into region values insert into region values
(1, 'Est'), (2, 'Ouest'); (1, 'Est'), (2, 'Ouest');
-- Apache Superset
create database superset; create database superset;
create user superset with password 'supermotdepasse';
grant all privileges on database superset to superset;
\c superset
alter schema public owner to superset;
grant all privileges on schema public to superset;

2
superset_config.py Normal file
View File

@@ -0,0 +1,2 @@
SECRET_KEY = 'YOUR_OWN_RANDOM_GENERATED_SECRET_KEY'
SQLALCHEMY_DATABASE_URI = "postgresql+psycopg2://superset:supermotdepasse@database:5432/superset"