-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(template): added apache superset (unofficial) with postgres #4891
base: next
Are you sure you want to change the base?
Conversation
Actually, a potential issue with the "Connect to Predefined Networks" checkbox (necessary to pull data from other databases on Coolify): Since superset has its own redis cache, the file volume mount For example, $ docker ps --filter "name=redis" --format "{{.ID}} | {{.Names}}"
bd2e2aedb5bd | redis-qo0gsoowco804scgocwgw88o # this is superset's redis
3b3169c7f2a9 | coolify-redis Inspecting superset redis: $ docker inspect bd2e2aedb5bd | grep DNSNames -A3
# Under NetworkSettings -> Networks -> Coolify
"DNSNames": [
"redis-qo0gsoowco804scgocwgw88o",
"bd2e2aedb5bd"
]
# Under NetworkSettings -> Networks -> qo0gsoowco804scgocwgw88o
# (UUID-generated network from "Connect to Predefined Networks")
"DNSNames": [
"redis-qo0gsoowco804scgocwgw88o",
"redis",
"bd2e2aedb5bd" and inspecting coolify redis:
Since the superset container's
and the superset container is in both networks, I assume the host Is there a way around this? Or perhaps, if possible, move the priority so that the internal network takes precedence over Coolify's network. Worst case, the |
Found a workaround (b617a08) by using By adding the following python code: COOLIFY_UUID = os.getenv('COOLIFY_CONTAINER_NAME').strip('"').split('-')[-1]
# ...
# Then, for example with postgres db, we can use our new db-{COOLIFY_UUID} host:
SQLALCHEMY_DATABASE_URI = f"postgresql+psycopg2://{os.getenv('POSTGRES_USER')}:{os.getenv('POSTGRES_PASSWORD')}@db-{COOLIFY_UUID}:5432/{os.getenv('POSTGRES_DB')}" COOLIFY_CONTAINER_NAME double quotesAn issue I discovered was that the environment variable Hence why the This likely stems from here: coolify/app/Jobs/ApplicationDeploymentJob.php Lines 926 to 928 in 86e14f3
and/or here: coolify/app/Jobs/ApplicationDeploymentJob.php Lines 985 to 987 in 86e14f3
Expose COOLIFY_UUIDAs per the original request in #2545, this would simplify the need to extract the |
Changes
Apache Superset is a popular "Data Visualization and Data Exploration Platform". Currently, it has ~64k stars on GitHub.
Unfortunately, superset does not officially support docker-compose in production:
This template uses an unofficial docker image to allow for production docker deployment. However, this in itself is also quite popular, with nearly 1k stars on GitHub:
and over 5 million downloads on DockerHub:
There are multiple flavours of superset (unofficial) that are supported, e.g.
However, given that it's "unofficial", I wanted to run this through the Coolify team before proceeding with the
superset-unofficial-with-celery
andsuperset-unofficial-with-mysql
templates, in case the policy is to not accept unofficial images.NOTE: for the first launch, you will need to enter the superset container using Coolify's terminal feature to run
to register the admin user and database. Alternatively, the
superset-demo
command will do the same, and additionally load demo database/charts/dashboards into the superset instance.I'm happy to contribute this to documentations-coolify if it gets the green light.
Demonstration:
demo.webm