App Suggestion: Apache SuperSet
Please tell us what app you'd like to see on CapRover as a one-click app.
Apache SuperSet is a tool for generate reports (dashboards) from a lot of databases flavors, like postgresql.
It's easy make graphs from your database data.
Do you know if there is any official Docker image for the app?
Yes, https://superset.apache.org/docs/installation/installing-superset-using-docker-compose
Maybe this help
https://github.com/amancevice/docker-superset/blob/main/examples/postgres/docker-compose.yml
I made based on above repository:
captainVersion: 4
services:
$$cap_appname-postgres:
image: postgres:14.5
volumes:
- $$cap_appname-db-data:/var/lib/postgresql/data
environment:
POSTGRES_DB: $$cap_postgres_database_name
POSTGRES_USER: $$cap_postgres_user
POSTGRES_PASSWORD: $$cap_postgres_passwd
caproverExtra:
notExposeAsWebApp: 'true'
# Cache
$$cap_appname-redis:
image: redis:6
volumes:
- $$cap_appname-redis:/data
caproverExtra:
notExposeAsWebApp: 'true'
# https://github.com/amancevice/docker-superset
$$cap_appname:
image: amancevice/superset:$$cap_superset_tag
depends_on:
- $$cap_appname-postgres
- $$cap_appname-redis
volumes:
- $$cap_appname-superset:/etc/superset/
restart: always
environment:
SQLALCHEMY_TRACK_MODIFICATIONS: 'true'
SECRET_KEY: $$cap_gen_random_hex(28)
SQLALCHEMY_DATABASE_URI: 'postgres+psycopg2://$$cap_postgres_user:$$cap_postgres_passwd@db:5432/$$cap_postgres_database_name'
DB_HOST: srv-captain--$$cap_appname-postgres
DB_PORT: '5432'
DB_DATABASE: $$cap_postgres_database_name
DB_USER: $$cap_postgres_user
DB_PASSWORD: $$cap_postgres_passwd
CACHE_REDIS: redis://srv-captain--$$cap_appname-redis:6379
APP_TIMEZONE: 'America/Recife'
caproverExtra:
containerHttpPort: '8088'
caproverOneClickApp:
variables:
- description: Apache Superset URL
defaultValue: https://superset.mydomain.com
id: $$cap_superset_APP_URL
label: URL Superset
- description: Apache Superset version https://hub.docker.com/r/amancevice/superset/
defaultValue: latest
id: $$cap_superset_tag
label: Docker version tag
validRegex: /.{1,}/
- description: Postgresql 14.5 database
defaultValue: superset
id: $$cap_postgres_database_name
label: Database name
validRegex: /.{1,}/
- description: Database user
defaultValue: apachesuper
id: $$cap_postgres_user
label: User or postgresql 14.5 connection
validRegex: /.{1,}/
- description: password for database
defaultValue: $$cap_gen_random_hex(16)
id: $$cap_postgres_passwd
label: Database password
validRegex: /^(?=.*\d).{10,}$/
instructions:
end: >
Installation it's done
Data Analytics running http://$$cap_appname.$$cap_root_domain
start: >-
Apache Superset -> https://kondado.com.br/visualizations/superset.html
displayName: 'superset'
isOfficial: false
description: Apache Superset
documentation: Read about Apache Superset https://superset.apache.org/docs/intro/
I have some problems to work fine:
- How do I create the superset_config.py file on deploy?
- How do I start the image with the user and password already created? docker exec -it superset superset-init
With
- How do I start the image with the user and password already created? docker exec -it superset superset-init
You can probably use another service, e.g. superset_db_setup. For example, using docker-compose.yaml syntax, it could look like
# ...
restart: "no"
depends_on:
- db
command: >
/bin/bash -c "
set -e &&
pip install psycopg2-binary &&
superset db upgrade &&
superset fab create-admin --username admin --password password --email [email protected] --firstname Admin --lastname User &&
superset init &&
echo Completed Setup!
"