I'm able to create a working container group of Apache Superset using the Azure CLI like this:
az container create --resource-group myrg --name superset-test --image apache/superset:1.5.1 --dns-name-label superset-test --ports 80 8088 --cpu 2 --memory 8
Now I want to pass some environment vars to customize the deployment, e.g., I want the database backend to be my Azure Postgres Flexible Server, not the default Postgres docker container superset_db. But I can't figure out how to pass that info via environment variables.
I've tried like this, with --environment-variables:
az container create --resource-group myrg --name superset-test --image apache/superset:1.5.1
--dns-name-label superset-test --ports 80 8088 --cpu 2 --memory 8 --environment-variables DATABASE_DIALECT="postgresql"
"DATABASE_USER"="superset" "DATABASE_PASSWORD"="superset" "DATABASE_HOST"="azpostgresql1.mydomain.com"
"DATABASE_PORT"="5432" "DATABASE_DB"="superset"
But they seem to be ignored - the Superset container starts up the same way and no data is populated into my db. Can I do this via the CLI? Or is there another way I should execute this deployment?
Update: I'm now focused on the SECRET_KEY variable since, if one is not passed, the default is used and a message appears in the container once I connect to it via the Azure web portal and run superset init:
A Default SECRET_KEY was detected, please use superset_config.py to override it.
That's a clean way to verify that the problem is in my env variables. Once the container starts up, I can verify the connection to the same Postgres DB I want to use as the application backend by listing it as a database source and testing the connection.