Skip to content

Commit

Permalink
OZ-671: Fix SSO by update Superset image to mekomsolutions/superset-sso
Browse files Browse the repository at this point in the history
  • Loading branch information
enyachoke committed Sep 5, 2024
1 parent 0ff3266 commit 5e7a734
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 25 deletions.
3 changes: 2 additions & 1 deletion docker/.env
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,5 @@ SUPERSET_HOME=
ZOOKEEPER_URL=zookeeper:2181

#Keycloak
KEYCLOAK_HOSTNAME=
KEYCLOAK_HOSTNAME=
ISSUER_URL=
41 changes: 17 additions & 24 deletions docker/docker-compose-superset.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,12 @@
services:
env-substitution:
image: mekomsolutions/env-substitution
networks:
- ozone-analytics
restart: on-failure
environment:
- SUPERSET_URL=https://${SUPERSET_HOSTNAME}
- KEYCLOAK_URL=https://${KEYCLOAK_HOSTNAME}
- KEYCLOAK_AUTH_SERVER_URL=https://${KEYCLOAK_HOSTNAME}
- SUPERSET_CLIENT_SECRET=${SUPERSET_CLIENT_SECRET}
volumes:
- "${DISTRO_PATH}:/opt/env-substitution/files"
superset:
depends_on:
redis:
condition: service_started
postgresql:
condition: service_started
superset-init:
condition: service_completed_successfully
condition: service_completed_successfully
env-substitution:
condition: service_completed_successfully
environment: &superset-env
Expand All @@ -36,10 +24,12 @@ services:
- ANALYTICS_DATASOURCE_NAME=${ANALYTICS_DATASOURCE_NAME}
- SUPERSET_PUBLIC_URL=https://${SUPERSET_HOSTNAME}
- KEYCLOAK_URL=https://${KEYCLOAK_HOSTNAME}
- ISSUER_URL=https://${KEYCLOAK_HOSTNAME}/realms/ozone/
- SUPERSET_CLIENT_SECRET=${SUPERSET_CLIENT_SECRET}
- SUPERSET_CLIENT_ID=${SUPERSET_CLIENT_ID}
- SUPERSET_CLIENT_ID=superset
- ENABLE_OAUTH=${ENABLE_OAUTH}

image: &superset-image mekomsolutions/superset-pro
image: &superset-image mekomsolutions/superset-sso
labels:
traefik.enable: "true"
traefik.http.routers.superset.rule: "Host(`${SUPERSET_HOSTNAME}`)"
Expand All @@ -49,9 +39,11 @@ services:
- web
- ozone-analytics
restart: unless-stopped
volumes:
- ${SUPERSET_CONFIG_PATH}/:/etc/superset/

volumes: &superset-volumes
- ${SUPERSET_CONFIG_PATH}/superset_config.py:/app/superset_config.py
- ${SUPERSET_CONFIG_PATH}/security.py:/app/security.py
- ${SUPERSET_CONFIG_PATH}/superset-init.sh:/app/superset-init.sh

superset-worker:
command: "celery --app=superset.tasks.celery_app:app worker --pool=gevent -Ofair -n worker1@%h --loglevel=INFO"
depends_on:
Expand All @@ -60,25 +52,26 @@ services:
postgresql:
condition: service_started
superset-init:
condition: service_completed_successfully
condition: service_completed_successfully
environment: *superset-env
image: *superset-image
restart: unless-stopped
volumes:
- ${SUPERSET_CONFIG_PATH}/:/etc/superset/
volumes: *superset-volumes
networks:
- ozone-analytics

superset-init:
command: "/etc/superset/superset-init.sh"
command: "/app/superset-init.sh"
depends_on:
- postgresql
- redis
environment: *superset-env
image: *superset-image
restart: on-failure
volumes:
- ${SUPERSET_CONFIG_PATH}/:/etc/superset/
- ${SUPERSET_CONFIG_PATH}/superset_config.py:/app/superset_config.py
- ${SUPERSET_CONFIG_PATH}/security.py:/app/security.py
- ${SUPERSET_CONFIG_PATH}/superset-init.sh:/app/superset-init.sh
- ${SUPERSET_DASHBOARDS_PATH}/:/dashboards/
networks:
- ozone-analytics
Expand All @@ -102,4 +95,4 @@ networks:
ozone-analytics:
web:
external: true
name: web
name: web

0 comments on commit 5e7a734

Please sign in to comment.