Deploy with docker
The Superset project ships with docker-compose files. We are providing one, in docker/ folder, that is inspired from their docker-compose-image-tag.yml file.
Warning
As you might know, running geOrchestra in production based on the docker-compose file is not recommended. Similarly, running Superset with geOrchestra using docker is more considered as for testing purpose.
You are expected to already have a working geOrchestra instance, started from the geOrchestra docker composition.
It is also expected you followed the preparation steps.
We are going to add the superset compo into this folder, which will make things easier to deploy superset on the same network as the geOrchestra composition.
Here are the steps to follow:
- Create a user and schema for superset in the geOrchestra DB, as instructed in Use the geOrchestra applicative database above. This can be automated with the command
docker compose exec database psql -U georchestra -c "CREATE USER superset WITH ENCRYPTED PASSWORD 'superset'; CREATE SCHEMA AUTHORIZATION superset; ALTER ROLE superset SET search_path = superset;" - copy into your georchestra docker folder the following files from this repo (and precisely in this order):
- config/ folder (will add a
supersetfolder into your config folder) - docker/* files into your geOrchestra
dockerfolder
- config/ folder (will add a
-
Adjust the config files for superset. You should need only to adapt the
superset_georchestra_config.pyfile orPreconfig.py(declares the DB connection strings)- generate and add the SECRET_KEY
-
Run it, adding the
-f docker-compose.supersetoption in yourdocker composecommand, e.g.docker compose -f docker-compose.yml -f docker-compose.override.yml -d docker-compose.superset.yml up -d - Or you can add it in the
includesection of the main docker-compose.yml:and then simply runinclude: - ... - docker-compose.superset.ymldocker compose up -d