An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
feat(service): add apache superset service (#4891)
Khiet Tam Nguyen4f0495172c20
diff --git a/public/svgs/superset.svg b/public/svgs/superset.svgnew file mode 100644index 0000000000..522c3b28a7--- /dev/null+++ b/public/svgs/superset.svg@@ -0,0 +1,9 @@+<?xml version="1.0" encoding="UTF-8"?>+<svg width="256px" height="128px" viewBox="0 0 256 128" version="1.1" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid">+ <title>Superset</title>+ <g>+ <path d="M190.218924,0 C168.269282,0 148.049828,12.3487941 128.508879,33.9252584 C109.307183,12.0095415 88.748476,0 65.7810761,0 C27.7508614,0 0,27.1402067 0,63.67771 C0,100.215213 27.7508614,127.016168 65.7810761,127.016168 C89.1555791,127.016168 107.271667,116.058309 127.491121,94.2104426 C147.03207,116.12616 166.912271,127.084018 190.218924,127.084018 C228.249139,127.016168 256,100.316989 256,63.67771 C256,27.038431 228.249139,0 190.218924,0 Z M66.0524781,88.6806255 C49.9379804,88.6806255 40.3371323,78.0620196 40.3371323,64.0169626 C40.3371323,49.9719056 49.9379804,39.0479724 66.0524781,39.0479724 C79.6225815,39.0479724 90.716141,49.9719056 102.725682,64.6954678 C91.3946462,78.4012722 79.4190299,88.6806255 66.0524781,88.6806255 Z M189.065465,88.6806255 C175.698913,88.6806255 164.401802,78.0620196 152.392261,64.0169626 C164.741055,49.2934005 175.359661,39.0479724 189.065465,39.0479724 C205.179963,39.0479724 214.679035,50.1076067 214.679035,64.0169626 C214.679035,77.9263186 205.179963,88.6806255 189.065465,88.6806255 Z" fill="#484848"></path>+ <path d="M156.124039,117.958124 L181.703684,87.4253909 C171.526107,84.3721177 162.12881,75.2122979 152.392261,63.8473363 L127.491121,94.2104426 C135.643361,103.668805 145.322237,111.695521 156.124039,117.958124 Z" fill="#20A7C9"></path>+ <path d="M128.508879,33.8913332 C120.41092,24.2972701 110.793109,16.0907501 100.045587,9.60084813 L74.432017,40.4728333 C84.1685661,43.8653591 92.7855818,52.6180758 101.945402,63.7794858 L102.963159,64.4919162 L128.508879,33.8913332 Z" fill="#20A7C9"></path>+ </g>+</svg>diff --git a/templates/compose/superset-unofficial-with-postgresql.yaml b/templates/compose/superset-unofficial-with-postgresql.yamlnew file mode 100644index 0000000000..ae1680ac91--- /dev/null+++ b/templates/compose/superset-unofficial-with-postgresql.yaml@@ -0,0 +1,93 @@+# documentation: https://github.com/amancevice/docker-superset+# slogan: Modern data exploration and visualization platform (unofficial docker image)+# tags: analytics,bi,dashboard,database,sql,unofficial+# logo: svgs/superset.svg+# port: 8088++services:+ superset:+ image: amancevice/superset+ restart: always+ depends_on:+ - superset_postgres+ - superset_redis+ environment:+ - SERVICE_FQDN_SUPERSET_8088+ - SECRET_KEY=${SERVICE_BASE64_64_SUPERSETSECRETKEY}+ - MAPBOX_API_KEY=${MAPBOX_API_KEY}+ - POSTGRES_USER=${SERVICE_USER_POSTGRES}+ - POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRES}+ - POSTGRES_DB=superset+ - REDIS_PASSWORD=${SERVICE_PASSWORD_REDIS}+ volumes:+ - type: bind+ source: ./superset/superset_config.py+ target: /etc/superset/superset_config.py+ content: |+ """+ For more configuration options, see:+ - https://superset.apache.org/docs/configuration/configuring-superset+ """++ import os++ SECRET_KEY = os.getenv("SECRET_KEY")+ MAPBOX_API_KEY = os.getenv("MAPBOX_API_KEY", "")+ COOLIFY_RESOURCE_UUID = os.getenv('COOLIFY_RESOURCE_UUID')++ CACHE_CONFIG = {+ "CACHE_TYPE": "RedisCache",+ "CACHE_DEFAULT_TIMEOUT": 300,+ "CACHE_KEY_PREFIX": "superset_",+ "CACHE_REDIS_HOST": "superset_redis",+ "CACHE_REDIS_PORT": 6379,+ "CACHE_REDIS_DB": 1,+ "CACHE_REDIS_URL": f"redis://:{os.getenv('REDIS_PASSWORD')}@superset_redis-{COOLIFY_RESOURCE_UUID}:6379/1",+ }++ FILTER_STATE_CACHE_CONFIG = {**CACHE_CONFIG, "CACHE_KEY_PREFIX": "superset_filter_"}+ EXPLORE_FORM_DATA_CACHE_CONFIG = {**CACHE_CONFIG, "CACHE_KEY_PREFIX": "superset_explore_form_"}++ SQLALCHEMY_TRACK_MODIFICATIONS = True+ SQLALCHEMY_DATABASE_URI = f"postgresql+psycopg2://{os.getenv('POSTGRES_USER')}:{os.getenv('POSTGRES_PASSWORD')}@superset_postgres-{COOLIFY_RESOURCE_UUID}:5432/{os.getenv('POSTGRES_DB')}"++ # Uncomment if you want to load example data (using "superset load_examples") at the+ # same location as your metadata postgresql instance. Otherwise, the default sqlite+ # will be used, which will not persist in volume when restarting superset by default.+ #SQLALCHEMY_EXAMPLES_URI = SQLALCHEMY_DATABASE_URI+ healthcheck:+ test: ["CMD", "curl", "-f", "http://127.0.0.1:8088/health"]+ interval: 5s+ timeout: 20s+ retries: 10++ superset_postgres:+ image: postgres+ restart: always+ environment:+ - POSTGRES_USER=${SERVICE_USER_POSTGRES}+ - POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRES}+ - POSTGRES_DB=superset+ volumes:+ - superset_postgres_data:/var/lib/postgresql/data+ healthcheck:+ test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]+ interval: 5s+ timeout: 20s+ retries: 10++ superset_redis:+ image: redis+ restart: always+ volumes:+ - superset_redis_data:/data+ command: redis-server --requirepass ${SERVICE_PASSWORD_REDIS}+ healthcheck:+ test: redis-cli ping+ interval: 5s+ timeout: 20s+ retries: 10++volumes:+ superset_postgres_data:+ superset_redis_data: